Documentation
¶
Index ¶
- type AbstractPredicaterClass
- func (pred *AbstractPredicaterClass) And(other Predicater) Predicater
- func (pred *AbstractPredicaterClass) IsEqual(targetRef interface{}) Predicater
- func (pred *AbstractPredicaterClass) Negate() Predicater
- func (pred *AbstractPredicaterClass) Or(other Predicater) Predicater
- func (pred *AbstractPredicaterClass) Test(value interface{}) bool
- type Predicater
- type PredicaterFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbstractPredicaterClass ¶
func (*AbstractPredicaterClass) And ¶
func (pred *AbstractPredicaterClass) And(other Predicater) Predicater
func (*AbstractPredicaterClass) IsEqual ¶
func (pred *AbstractPredicaterClass) IsEqual(targetRef interface{}) Predicater
func (*AbstractPredicaterClass) Negate ¶
func (pred *AbstractPredicaterClass) Negate() Predicater
func (*AbstractPredicaterClass) Or ¶
func (pred *AbstractPredicaterClass) Or(other Predicater) Predicater
func (*AbstractPredicaterClass) Test ¶
func (pred *AbstractPredicaterClass) Test(value interface{}) bool
type Predicater ¶
type Predicater interface {
/**
* Evaluates this predicate on the given argument.
*
* @param t the input argument
* @return {@code true} if the input argument matches the predicate,
* otherwise {@code false}
*/
Test(value interface{}) bool
/**
* Returns a composed predicate that represents a short-circuiting logical
* AND of this predicate and another. When evaluating the composed
* predicate, if this predicate is {@code false}, then the {@code other}
* predicate is not evaluated.
*
* <p>Any exceptions thrown during evaluation of either predicate are relayed
* to the caller; if evaluation of this predicate throws an exception, the
* {@code other} predicate will not be evaluated.
*
* @param other a predicate that will be logically-ANDed with this
* predicate
* @return a composed predicate that represents the short-circuiting logical
* AND of this predicate and the {@code other} predicate
* @throws NullPointerException if other is null
*/
And(other Predicater) Predicater
/**
* Returns a predicate that represents the logical negation of this
* predicate.
*
* @return a predicate that represents the logical negation of this
* predicate
*/
Negate() Predicater
/**
* Returns a composed predicate that represents a short-circuiting logical
* OR of this predicate and another. When evaluating the composed
* predicate, if this predicate is {@code true}, then the {@code other}
* predicate is not evaluated.
*
* <p>Any exceptions thrown during evaluation of either predicate are relayed
* to the caller; if evaluation of this predicate throws an exception, the
* {@code other} predicate will not be evaluated.
*
* @param other a predicate that will be logically-ORed with this
* predicate
* @return a composed predicate that represents the short-circuiting logical
* OR of this predicate and the {@code other} predicate
* @throws NullPointerException if other is null
*/
Or(other Predicater) Predicater
/**
* Returns a predicate that tests if two arguments are equal according
* to {@link Objects#equals(Object, Object)}.
*
* @param <T> the type of arguments to the predicate
* @param targetRef the object reference with which to compare for equality,
* which may be {@code null}
* @return a predicate that tests if two arguments are equal according
* to {@link Objects#equals(Object, Object)}
*/
IsEqual(targetRef interface{}) Predicater
}
*
- Represents a predicate (boolean-valued function) of one argument.
type PredicaterFunc ¶
type PredicaterFunc func(value interface{}) bool
func (PredicaterFunc) And ¶
func (f PredicaterFunc) And(other Predicater) Predicater
func (PredicaterFunc) IsEqual ¶
func (f PredicaterFunc) IsEqual(targetRef interface{}) Predicater
func (PredicaterFunc) Negate ¶
func (f PredicaterFunc) Negate() Predicater
func (PredicaterFunc) Or ¶
func (f PredicaterFunc) Or(other Predicater) Predicater
func (PredicaterFunc) Test ¶
func (f PredicaterFunc) Test(value interface{}) bool
Click to show internal directories.
Click to hide internal directories.