Class Getter<R,A>

java.lang.Object
ch.njol.skript.util.Getter<R,A>
Type Parameters:
R - the returned value type
A - the type which holds the value
All Implemented Interfaces:
Converter<A,R>
Direct Known Subclasses:
SerializableGetter

public abstract class Getter<R,A> extends Object implements Converter<A,R>
Used to get a specific value from instances of some type.
  • Constructor Details

    • Getter

      public Getter()
  • Method Details

    • get

      @Nullable public abstract R get(A arg)
      Gets a value from the given object.
      Parameters:
      arg - the object to get the value from
      Returns:
      the value
    • convert

      @Nullable public final R convert(A a)
      Convenience method to make getter implement converter
      Specified by:
      convert in interface Converter<R,A>
      Parameters:
      a - The object to convert.
      Returns:
      the converted object