Package com.helger.commons.wrapper
Class Wrapper<DATATYPE>
- java.lang.Object
-
- com.helger.commons.wrapper.Wrapper<DATATYPE>
-
- Type Parameters:
DATATYPE- The type of object to be wrapped.
- All Implemented Interfaces:
ICloneable<Wrapper<DATATYPE>>,IMutableWrapper<DATATYPE>,IWrapper<DATATYPE>,Supplier<DATATYPE>
@NotThreadSafe public class Wrapper<DATATYPE> extends Object implements IMutableWrapper<DATATYPE>, ICloneable<Wrapper<DATATYPE>>
This is a stupid wrapper around any object. Its original purpose was the encapsulation of return values from within an anonymous class.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)DATATYPEget()Wrapper<DATATYPE>getClone()inthashCode()EChangeset(DATATYPE aObj)Change the wrapped object.StringtoString()
-
-
-
Method Detail
-
set
@Nonnull public EChange set(@Nullable DATATYPE aObj)
Description copied from interface:IMutableWrapperChange the wrapped object.- Specified by:
setin interfaceIMutableWrapper<DATATYPE>- Parameters:
aObj- The new object to be wrapped. May benull.- Returns:
EChange
-
getClone
@Nonnull @ReturnsMutableCopy public Wrapper<DATATYPE> getClone()
- Specified by:
getClonein interfaceICloneable<DATATYPE>- Returns:
- A 100% deep-copy of the implementing class.
-
-