DATATYPE - The type of object to be wrapped.@NotThreadSafe public class Wrapper<DATATYPE> extends Object implements IMutableWrapper<DATATYPE>, ICloneable<Wrapper<DATATYPE>>
| Constructor and Description |
|---|
Wrapper()
Default constructor.
|
Wrapper(DATATYPE aObj)
Constructor with an existing object.
|
Wrapper(IWrapper<DATATYPE> aRhs)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static <DATATYPE> Wrapper<DATATYPE> |
create(DATATYPE aObj)
Static factory method with automatic type deduction.
|
boolean |
equals(Object o) |
DATATYPE |
get() |
Wrapper<DATATYPE> |
getClone() |
int |
hashCode() |
boolean |
isSet() |
EChange |
set(DATATYPE aObj)
Change the wrapped object.
|
String |
toString() |
public Wrapper()
public Wrapper(@Nullable DATATYPE aObj)
aObj - The existing object. May be null.public boolean isSet()
@Nonnull public EChange set(@Nullable DATATYPE aObj)
IMutableWrapperset in interface IMutableWrapper<DATATYPE>aObj - The new object to be wrapped. May be null.EChange@Nonnull @ReturnsMutableCopy public Wrapper<DATATYPE> getClone()
getClone in interface ICloneable<Wrapper<DATATYPE>>Copyright © 2014–2016 Philip Helger. All rights reserved.