Class WrappedObject<T>

java.lang.Object
info.u_team.music_player.util.WrappedObject<T>
Type Parameters:
T -

public class WrappedObject<T> extends Object
This class holds an object. This class is immutable. To get the object use get(). This method use the default implementation of Object.hashCode() and Object.equals(Object). This ensures there can't be WrappedObject which are equals. This can be used in the Collection Framework Collection for some special use.
  • Constructor Details

    • WrappedObject

      public WrappedObject(T object)
      Creates a new WrappedObject
      Parameters:
      object - The object you want to wrap. Must match the generic type
  • Method Details

    • get

      public T get()
      Retrieves the wrapped object
      Returns:
      Wrapped object