T
- the returned value type.public final class Identity<T> extends Object implements Function<T,T>, Predicate<T>
Evaluates
to its input argument.
Tests
to the boolean
value of the Boolean
-valued parameter.
The test(java.lang.Object)
method throws an exception if
the parameter isn't a non-null
Boolean
.Modifier and Type | Field and Description |
---|---|
static Identity<Object> |
INSTANCE
A generic
Identity<Object> instance. |
Constructor and Description |
---|
Identity()
Create a new Identity.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object that) |
T |
evaluate(T obj)
Evaluate this function.
|
int |
hashCode() |
static <T> Identity<T> |
instance()
Get an Identity instance.
|
boolean |
test(Boolean bool)
Test a Boolean object by returning its
booleanValue . |
boolean |
test(Object obj)
Evaluate this predicate.
|
String |
toString() |
public Identity()
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.