Пример #1
0
 @Override
 public boolean any(Callable<? extends ceylon.language.Boolean> arg0) {
   for (int ii = this.start; ii < this.end; ii += this.step) {
     if (arg0.$call$(ceylon.language.Float.instance(array[ii])).booleanValue()) {
       return true;
     }
   }
   return false;
 }
Пример #2
0
 public static double[] toDoubleArray(
     ceylon.language.Iterable<? extends ceylon.language.Float, ? extends java.lang.Object>
         sequence,
     double... initialElements) {
   if (sequence instanceof ceylon.language.List)
     return toDoubleArray(
         (ceylon.language.List<? extends ceylon.language.Float>) sequence, initialElements);
   List<ceylon.language.Float> list = collectIterable(sequence);
   double[] ret = new double[list.size() + initialElements.length];
   int i = 0;
   for (; i < initialElements.length; i++) {
     ret[i] = initialElements[i];
   }
   for (ceylon.language.Float e : list) {
     ret[i++] = e.doubleValue();
   }
   return ret;
 }
Пример #3
0
 @Override
 public ceylon.language.Float getLast() {
   return this.getEmpty() ? null : ceylon.language.Float.instance(this.array[this.end - 1]);
 }