Ejemplo n.º 1
0
 /** {@inheritDoc} */
 public TFloatList inverseGrep(TFloatProcedure condition) {
   TFloatList ret = new TFloatLinkedList();
   for (TFloatLink l = head; got(l); l = l.getNext()) {
     if (!condition.execute(l.getValue())) ret.add(l.getValue());
   }
   return ret;
 }
 /** {@inheritDoc} */
 public boolean forEachValue(TFloatProcedure procedure) {
   byte[] states = _states;
   float[] values = _values;
   for (int i = values.length; i-- > 0; ) {
     if (states[i] == FULL && !procedure.execute(values[i])) {
       return false;
     }
   }
   return true;
 }
Ejemplo n.º 3
0
 /**
  * Executes <tt>procedure</tt> for each key in the map.
  *
  * @param procedure a <code>TFloatProcedure</code> value
  * @return false if the loop over the set terminated because the procedure returned false for some
  *     value.
  */
 public boolean forEach(TFloatProcedure procedure) {
   byte[] states = _states;
   float[] set = _set;
   for (int i = set.length; i-- > 0; ) {
     if (states[i] == FULL && !procedure.execute(set[i])) {
       return false;
     }
   }
   return true;
 }
Ejemplo n.º 4
0
 /** {@inheritDoc} */
 public boolean forEachDescending(TFloatProcedure procedure) {
   for (TFloatLink l = tail; got(l); l = l.getPrevious()) {
     if (!procedure.execute(l.getValue())) return false;
   }
   return true;
 }
Ejemplo n.º 5
0
 /** {@inheritDoc} */
 public boolean forEach(TFloatProcedure procedure) {
   for (TFloatLink l = head; got(l); l = l.getNext()) {
     if (!procedure.execute(l.getValue())) return false;
   }
   return true;
 }