Esempio n. 1
0
 @Override
 public int indexOf(Object target) {
   // Overridden to prevent a ton of boxing
   if (target instanceof Character) {
     int i = Chars.indexOf(array, (Character) target, start, end);
     if (i >= 0) {
       return i - start;
     }
   }
   return -1;
 }
Esempio n. 2
0
 @Override
 public boolean contains(Object target) {
   // Overridden to prevent a ton of boxing
   return (target instanceof Character)
       && Chars.indexOf(array, (Character) target, start, end) != -1;
 }