Class Holder<T>

java.lang.Object
buildengine.utils.Holder<T>
Direct Known Subclasses:
Actor, Scene

public abstract class Holder<T> extends Object
  • Constructor Details

    • Holder

      public Holder()
  • Method Details

    • addAll

      public void addAll(T... ts)
      Add multiple items.
      See Also:
    • add

      public void add(T t)
      Add a t
    • remove

      public void remove(T t)
      Removes a t if it has the specified t
    • contains

      public boolean contains(T t)
    • contains

      public <U> boolean contains(Class<U> classType)
    • get

      public <U> U get(Class<U> classType)
      Returns the first type of T in the list
      Type Parameters:
      U - The class type
      Parameters:
      classType - The type to test for
      Returns:
      the first instance of the class
    • getList

      public List<T> getList()
      Collects all the components of the actor and puts it into an Array
      Returns:
      an array of the Actor's components