code: public static int compareCodePoint(int codePoint, CharSequence s) {
          if (s == null) {
              return 1;
          }
          final int strLen = s.length();
          if (strLen == 0) {
              return 1;
          }
          int second = Character.codePointAt(s, 0);
          int diff = codePoint - second;
          if (diff != 0) {
              return diff;
          }
          return strLen == Character.charCount(codePoint) ? 0 : -1;
      }
docs: Utility for comparing a code point to a string without having to create a new string. Returns the same results
  as a code point comparison of UTF16.valueOf(codePoint) and s.toString(). More specifically, if
  <pre>
  sc = new StringComparator(true,false,0);
  fast = UTF16.compareCodePoint(codePoint, charSequence)
  slower = sc.compare(UTF16.valueOf(codePoint), charSequence == null ? "" : charSequence.toString())
  </pre>
  then
  <pre>
  Integer.signum(fast) == Integer.signum(slower)
  </pre>
  @param codePoint to test
  @param s to test
  @return equivalent of code point comparator comparing two strings.