/** * Returns a predicated (validating) buffer backed by the given buffer. * <p> * Only objects that pass the test in the given predicate can be added to the buffer. * Trying to add an invalid object results in an IllegalArgumentException. * It is important not to use the original buffer after invoking this method, * as it is a backdoor for adding invalid objects. * * @param buffer the buffer to predicate, must not be null * @param predicate the predicate used to evaluate new elements, must not be null * @return a predicated buffer * @throws IllegalArgumentException if the Buffer or Predicate is null */ public static Buffer predicatedBuffer(Buffer buffer, Predicate predicate) { return PredicatedBuffer.decorate(buffer, predicate); }
/** * Returns a predicated (validating) buffer backed by the given buffer. * <p> * Only objects that pass the test in the given predicate can be added to the buffer. * Trying to add an invalid object results in an IllegalArgumentException. * It is important not to use the original buffer after invoking this method, * as it is a backdoor for adding invalid objects. * * @param buffer the buffer to predicate, must not be null * @param predicate the predicate used to evaluate new elements, must not be null * @return a predicated buffer * @throws IllegalArgumentException if the Buffer or Predicate is null */ public static Buffer predicatedBuffer(Buffer buffer, Predicate predicate) { return PredicatedBuffer.decorate(buffer, predicate); }
protected Buffer decorateBuffer(Buffer buffer, Predicate predicate) { return PredicatedBuffer.decorate(buffer, predicate); }
/** * Returns a predicated (validating) buffer backed by the given buffer. * <p> * Only objects that pass the test in the given predicate can be added to the buffer. * Trying to add an invalid object results in an IllegalArgumentException. * It is important not to use the original buffer after invoking this method, * as it is a backdoor for adding invalid objects. * * @param buffer the buffer to predicate, must not be null * @param predicate the predicate used to evaluate new elements, must not be null * @return a predicated buffer * @throws IllegalArgumentException if the Buffer or Predicate is null */ public static Buffer predicatedBuffer(Buffer buffer, Predicate predicate) { return PredicatedBuffer.decorate(buffer, predicate); }
/** * Returns a predicated (validating) buffer backed by the given buffer. * <p> * Only objects that pass the test in the given predicate can be added to the buffer. * Trying to add an invalid object results in an IllegalArgumentException. * It is important not to use the original buffer after invoking this method, * as it is a backdoor for adding invalid objects. * * @param buffer the buffer to predicate, must not be null * @param predicate the predicate used to evaluate new elements, must not be null * @return a predicated buffer * @throws IllegalArgumentException if the Buffer or Predicate is null */ public static Buffer predicatedBuffer(Buffer buffer, Predicate predicate) { return PredicatedBuffer.decorate(buffer, predicate); }
/** * Returns a predicated (validating) buffer backed by the given buffer. * <p> * Only objects that pass the test in the given predicate can be added to the buffer. * Trying to add an invalid object results in an IllegalArgumentException. * It is important not to use the original buffer after invoking this method, * as it is a backdoor for adding invalid objects. * * @param buffer the buffer to predicate, must not be null * @param predicate the predicate used to evaluate new elements, must not be null * @return a predicated buffer * @throws IllegalArgumentException if the Buffer or Predicate is null */ public static Buffer predicatedBuffer(Buffer buffer, Predicate predicate) { return PredicatedBuffer.decorate(buffer, predicate); }
/** * Returns a predicated (validating) buffer backed by the given buffer. * <p> * Only objects that pass the test in the given predicate can be added to the buffer. * Trying to add an invalid object results in an IllegalArgumentException. * It is important not to use the original buffer after invoking this method, * as it is a backdoor for adding invalid objects. * * @param buffer the buffer to predicate, must not be null * @param predicate the predicate used to evaluate new elements, must not be null * @return a predicated buffer * @throws IllegalArgumentException if the Buffer or Predicate is null */ public static Buffer predicatedBuffer(Buffer buffer, Predicate predicate) { return PredicatedBuffer.decorate(buffer, predicate); }
/** * Returns a predicated (validating) buffer backed by the given buffer. * <p> * Only objects that pass the test in the given predicate can be added to the buffer. * Trying to add an invalid object results in an IllegalArgumentException. * It is important not to use the original buffer after invoking this method, * as it is a backdoor for adding invalid objects. * * @param buffer the buffer to predicate, must not be null * @param predicate the predicate used to evaluate new elements, must not be null * @return a predicated buffer * @throws IllegalArgumentException if the Buffer or Predicate is null */ public static Buffer predicatedBuffer(Buffer buffer, Predicate predicate) { return PredicatedBuffer.decorate(buffer, predicate); }