DATATYPE - The type of object to be wrapped.@NotThreadSafe public class Wrapper<DATATYPE> extends Object implements IWrapper<DATATYPE>, ICloneable<Wrapper<DATATYPE>>
| Constructor and Description |
|---|
Wrapper()
Default constructor.
|
Wrapper(DATATYPE aObj)
Constructor with an existing object.
|
Wrapper(IReadonlyWrapper<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 Wrapper(@Nonnull IReadonlyWrapper<DATATYPE> aRhs)
aRhs - The other wrapper to use. May not be null.@Nullable public DATATYPE get()
get in interface IReadonlyWrapper<DATATYPE>null.public boolean isSet()
isSet in interface IReadonlyWrapper<DATATYPE>true if the contained value is not null,
false if it is null.@Nonnull public EChange set(@Nullable DATATYPE aObj)
IWrapper@Nonnull @ReturnsMutableCopy public Wrapper<DATATYPE> getClone()
getClone in interface ICloneable<Wrapper<DATATYPE>>Copyright © 2006–2014 phloc systems. All rights reserved.