Class DataComponent.Holder

java.lang.Object
com.saicone.rtag.data.DataComponent.Holder
Enclosing class:
DataComponent

@Experimental public static class DataComponent.Holder extends Object
Class to invoke methods from DataComponentHolder.
This type of data component object (as the name said) is just a holder for DataComponentMap to delegate methods.
  • Method Details

    • getComponents

      public static Object getComponents(Object holder)
      Get DataComponentMap from provided holder.
      Parameters:
      holder - the component holder to get map from.
      Returns:
      a DataComponentMap provided by holder.
    • get

      public static Object get(Object holder, Object type)
      Get a declared component type from provided holder.
      Parameters:
      holder - the component holder to get component from.
      type - the DataComponentType instance that declares a component type.
      Returns:
      the component declared type from data component cache if exists, null otherwise.
    • has

      public static boolean has(Object holder, Object type)
      Check if the provided holder has any type of DataComponentType inside.
      Parameters:
      holder - the component holder to check content.
      type - the DataComponentType instance.
      Returns:
      true if holder contains the provided component type.