public abstract class BaseWrapper<A> extends Object implements Serializable, Wrapper<A>
| Modifier | Constructor and Description |
|---|---|
protected |
BaseWrapper(A wrapped,
WrapperFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
protected WrapperFactory |
getFactory()
The factory for this instance
|
A |
getWrapped()
CONVENTION:
when the wrapper is used to create a new wrapped object, it might happen that this method needs public access.
|
Wrapper<A> |
wrap(A toWrap)
Call this method in subclasses in order to instantiate the wrapper class
that actually corresponds to the class of the object toWrap
|
List<Wrapper<A>> |
wrap(Collection<A> toWrap)
Call this method in subclasses in order to instantiate the wrapper class
that actually corresponds to the class of the object toWrap
|
protected BaseWrapper(A wrapped, WrapperFactory factory)
wrapped - is non-null object to wrapfactory - is the non-null factory that created thispublic final A getWrapped()
getWrapped in interface Wrapper<A>protected final WrapperFactory getFactory()
public final Wrapper<A> wrap(A toWrap) throws IllegalArgumentException
wrap in interface Wrapper<A>toWrap - is the object to wrap in another wrapper class. Might be null;IllegalArgumentException - when mapping is not possibleWrapper.wrap(Object)public final List<Wrapper<A>> wrap(Collection<A> toWrap) throws IllegalArgumentException
wrap in interface Wrapper<A>toWrap - is the object to wrap in another wrapper class. Might be null;IllegalArgumentException - when mapping is not possibleWrapper.wrap(Collection)Copyright © 2001–2018 MDA Tools. All rights reserved.