code: public final boolean contains(int c) {
          
          if(c>0x10ffff) {
              return false;
          }
              
          if(c<=0xffff) {
              int i;
              /* find c in the BMP part */
              for(i=0; i<bmpLength && (char)c>=array[i]; ++i) {}
              return ((i&1) != 0);
          } else {
              int i;
              /* find c in the supplementary part */
              char high=(char)(c>>16), low=(char)c;
              for(i=bmpLength;
                  i<length && (high>array[i] || (high==array[i] && low>=array[i+1]));
                  i+=2) {}
          
              /* count pairs of 16-bit units even per BMP and check if the number of pairs is odd */
              return (((i+bmpLength)&2)!=0);
          }
      }
docs: Returns true if the given USerializedSet contains the given
  character.
  @param c the character to test for
  @return true if set contains c