Interface QueryMetadataKey<T>

Type Parameters:
T - Anything

public interface QueryMetadataKey<T>
Metadata Key used to get Metadata Value
Author:
Thito Yalasatria Sunarya
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    cast(Object from)
    Handle object casting
    boolean
    Determine if the object is exactly what we wanted
    Key name
    static <T> QueryMetadataKey<T>
    Create new key using Cast-able rule where this key only accept value that instance of the specified class
  • Method Details

    • newCastableKey

      static <T> QueryMetadataKey<T> newCastableKey(String key, Class<T> cl)
      Create new key using Cast-able rule where this key only accept value that instance of the specified class
      Type Parameters:
      T - Anything
      Parameters:
      key - The key name for name()
      cl - The class owner
      Returns:
      The created metadata key
    • name

      String name()
      Key name
      Returns:
    • cast

      T cast(Object from)
      Handle object casting
      Parameters:
      from - Object stored in the metadata storage
      Returns:
      Casted object
    • isInstance

      boolean isInstance(Object from)
      Determine if the object is exactly what we wanted
      Parameters:
      from - Object stored in the metadata storage
      Returns:
      true if its the object we wanted
      See Also: