/** {@inheritDoc} */ @Override public boolean forEachDescending(TShortProcedure procedure) { for (int i = _pos; i-- > 0; ) { if (!procedure.execute(_data.get(i))) { return false; } } return true; }
/** {@inheritDoc} */ @Override public boolean forEach(TShortProcedure procedure) { for (int i = 0; i < _pos; i++) { if (!procedure.execute(_data.get(i))) { return false; } } return true; }
/** {@inheritDoc} */ public boolean forEachValue(TShortProcedure procedure) { byte[] states = _states; short[] values = _values; for (int i = values.length; i-- > 0; ) { if (states[i] == FULL && !procedure.execute(values[i])) { return false; } } return true; }
/** {@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; }