Пример #1
0
 @SuppressWarnings("unchecked")
 public static <T> List<T> collectIterable(
     Iterable<? extends T, ? extends java.lang.Object> sequence) {
   List<T> list = new LinkedList<T>();
   if (sequence != null) {
     Iterator<? extends T> iterator = sequence.iterator();
     Object o;
     while ((o = iterator.next()) != finished_.getFinished$()) {
       list.add((T) o);
     }
   }
   return list;
 }
Пример #2
0
 @Override
 public boolean containsAny(Iterable<? extends Object, ? extends Object> arg0) {
   Iterator<? extends Object> iter = arg0.iterator();
   Object item;
   while (!((item = iter.next()) instanceof Finished)) {
     if (item instanceof ceylon.language.Byte) {
       for (int ii = this.start; ii < this.end; ii += this.step) {
         if (array[ii] == ((ceylon.language.Byte) item).byteValue()) {
           return true;
         }
       }
     }
   }
   return false;
 }