Class Wrapper<DATATYPE>

java.lang.Object
com.helger.base.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
  • Constructor Details

    • Wrapper

      public Wrapper()
      Default constructor. Wraps a null values.
    • Wrapper

      public Wrapper(@Nullable DATATYPE aObj)
      Constructor with an existing object.
      Parameters:
      aObj - The existing object. May be null.
    • Wrapper

      public Wrapper(@Nonnull IWrapper<DATATYPE> aRhs)
      Copy constructor. Only takes wrappers of the same type.
      Parameters:
      aRhs - The other wrapper to use. May not be null.
  • Method Details