| Modifier and Type | Field and Description |
|---|---|
private Function<? super B,? extends A> |
backwardFunction |
private Function<? super A,? extends B> |
forwardFunction |
| Modifier | Constructor and Description |
|---|---|
private |
FunctionBasedConverter(Function<? super A,? extends B> forwardFunction,
Function<? super B,? extends A> backwardFunction) |
| Modifier and Type | Method and Description |
|---|---|
protected A |
doBackward(B b)
Returns a representation of
b as an instance of type A. |
protected B |
doForward(A a)
Returns a representation of
a as an instance of type B. |
boolean |
equals(java.lang.Object object)
Indicates whether another object is equal to this converter.
|
int |
hashCode() |
java.lang.String |
toString() |
andThen, apply, convert, convertAll, correctedDoBackward, correctedDoForward, doAndThen, from, identity, reverseprotected B doForward(A a)
Convertera as an instance of type B. If a cannot be
converted, an unchecked exception (such as IllegalArgumentException) should be thrown.protected A doBackward(B b)
Converterb as an instance of type A. If b cannot be
converted, an unchecked exception (such as IllegalArgumentException) should be thrown.doBackward in class Converter<A,B>b - the instance to convert; will never be nullpublic boolean equals(java.lang.Object object)
ConverterMost implementations will have no reason to override the behavior of Object.equals(java.lang.Object).
However, an implementation may also choose to return true whenever object is a
Converter that it considers interchangeable with this one. "Interchangeable"
typically means that Objects.equal(this.convert(a), that.convert(a)) is true for
all a of type A (and similarly for reverse). Note that a false
result from this method does not imply that the converters are known not to be
interchangeable.
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object