Class ObjectDecorator<T>

java.lang.Object
com.globalmentor.model.AbstractObjectDecorator<T>
com.globalmentor.model.ObjectDecorator<T>
Type Parameters:
T - The type of object being decorated.

public class ObjectDecorator<T> extends AbstractObjectDecorator<T>
An object that decorates another object, preserving the Object.hashCode() and Object.equals(Object) of the decorated object. Equality is only supported for exact top-level types. This class does not permit a null decorated object.
Author:
Garret Wilson
  • Constructor Details

    • ObjectDecorator

      public ObjectDecorator(T decoratedObject)
      Decorated object constructor.
      Parameters:
      decoratedObject - The object to decorate.
      Throws:
      NullPointerException - if the given object is null.