| Modifier and Type | Field and Description |
|---|---|
(package private) Converter<A,B> |
first |
(package private) Converter<B,C> |
second |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
ConverterComposition(Converter<A,B> first,
Converter<B,C> second) |
| Modifier and Type | Method and Description |
|---|---|
(package private) A |
correctedDoBackward(C c) |
(package private) C |
correctedDoForward(A a) |
protected A |
doBackward(C c)
Returns a representation of
b as an instance of type A. |
protected C |
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, doAndThen, from, identity, reverseprivate static final long serialVersionUID
protected C 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(C c)
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,C>c - the instance to convert; will never be null@CheckForNull C correctedDoForward(@CheckForNull A a)
correctedDoForward in class Converter<A,C>@CheckForNull A correctedDoBackward(@CheckForNull C c)
correctedDoBackward in class Converter<A,C>public boolean equals(@CheckForNull
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