/** * Override to validate the object being added to ensure it matches * the predicate. * * @param object the object being added * @return the result of adding to the underlying queue * @throws IllegalArgumentException if the add is invalid */ @Override public boolean offer(final E object) { validate(object); return decorated().offer(object); }