Class AbstractTransformer<E,W>
java.lang.Object
com.aoapps.collections.transformers.AbstractTransformer<E,W>
- Type Parameters:
E- The wrapper typeW- The wrapped type
- All Implemented Interfaces:
Transformer<E,W>
- Direct Known Subclasses:
FunctionalTransformer
Performs type conversions between two classes.
- Author:
- AO Industries, Inc.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractTransformer(Class<E> eClass, Class<W> wClass) Creates a new type converter. -
Method Summary
Modifier and TypeMethodDescriptionabstract EfromWrapped(W w) invert()abstract WGets a transformer that wraps and unwraps only when elements are of the wrapper or wrapped types, respectively.
-
Field Details
-
eClass
-
wClass
-
inverted
-
-
Constructor Details
-
AbstractTransformer
Creates a new type converter.- Parameters:
eClass- The wrapper typewClass- The wrapped type
-
-
Method Details
-
toWrapped
- Specified by:
toWrappedin interfaceTransformer<E,W>
-
fromWrapped
- Specified by:
fromWrappedin interfaceTransformer<E,W>
-
unbounded
Description copied from interface:TransformerGets a transformer that wraps and unwraps only when elements are of the wrapper or wrapped types, respectively. This is useful for legacy APIs that useObjector unbounded generics, such as:- Specified by:
unboundedin interfaceTransformer<E,W>
-
invert
- Specified by:
invertin interfaceTransformer<E,W>
-
