Top Description Fields Constructors Methods
org.eclipse.xtext.xbase.lib.internal

public Class BooleanFunctionDelegate<T>

extends Object
implements Predicate<T>
Class Inheritance
All Implemented Interfaces
com.google.common.base.Predicate, java.util.function.Predicate
Annotations
@GwtCompatible
Type Parameters
<T>
the type of the objects that can be used by this predicate.
Imports
org.eclipse.xtext.xbase.lib.Functions.Function1, com.google.common.annotations.GwtCompatible, com.google.common.base.Predicate

Internal wrapper to look like a google.collect predicate

Field Summary

Modifier and TypeField and Description
private final Functions.Function1<? super T, Boolean>

Constructor Summary

AccessConstructor and Description
public
BooleanFunctionDelegate(Functions.Function1<? super T, Boolean>
the delegate function. May not be null.
delegate
)

Creates a new BooleanFunctionDelegate that wraps the given delegate function.

Method Summary

Modifier and TypeMethod and Description
public boolean
apply(T input)

Implements com.google.common.base.Predicate.apply.

Returns the result of applying this predicate to input (Java 8+ users, see notes in the class documentation above).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final Functions.Function1<? super T, Boolean> delegate

Constructor Detail

BooleanFunctionDelegateback to summary
public BooleanFunctionDelegate(Functions.Function1<? super T, Boolean> delegate)

Creates a new BooleanFunctionDelegate that wraps the given delegate function. This implementation will throw a NullPointerException if the delegate's implementation returns null for a given object.

Parameters
delegate:Functions.Function1<? super T, Boolean>

the delegate function. May not be null.

Method Detail

applyback to summary
public boolean apply(T input)

Implements com.google.common.base.Predicate.apply.

Doc from com.google.common.base.Predicate.apply.

Returns the result of applying this predicate to input (Java 8+ users, see notes in the class documentation above). This method is generally expected, but not absolutely required, to have the following properties:

  • Its execution does not cause any observable side effects.
  • The computation is consistent with equals; that is, Objects.equal(a, b) implies that predicate.apply(a) == predicate.apply(b)).
Annotations
@Override