public boolean forEach(final TShortProcedure procedure) { for (int i = 0; i < this._pos; ++i) { if (!procedure.execute(this._data[i])) { return false; } } return true; }
public TShortArrayList inverseGrep(final TShortProcedure condition) { final TShortArrayList list = new TShortArrayList(); for (int i = 0; i < this._pos; ++i) { if (!condition.execute(this._data[i])) { list.add(this._data[i]); } } return list; }
public boolean forEachDescending(final TShortProcedure procedure) { int i = this._pos; while (i-- > 0) { if (!procedure.execute(this._data[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; }