コード例 #1
0
 /** {@inheritDoc} */
 @Override
 public boolean forEachDescending(TShortProcedure procedure) {
   for (int i = _pos; i-- > 0; ) {
     if (!procedure.execute(_data.get(i))) {
       return false;
     }
   }
   return true;
 }
コード例 #2
0
 /** {@inheritDoc} */
 @Override
 public boolean forEach(TShortProcedure procedure) {
   for (int i = 0; i < _pos; i++) {
     if (!procedure.execute(_data.get(i))) {
       return false;
     }
   }
   return true;
 }
コード例 #3
0
 /** {@inheritDoc} */
 @Override
 public TShortList inverseGrep(TShortProcedure condition) {
   TShortArrayList list = new TShortArrayList();
   for (int i = 0; i < _pos; i++) {
     short val = _data.get(i);
     if (!condition.execute(val)) {
       list.add(val);
     }
   }
   return list;
 }