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>

@Deprecated(forRemoval=true) public abstract class Getter<R,A> extends Object implements Converter<A,R>
Deprecated, for removal: This API element is subject to removal in a future version.
use Converter instead
Used to get a specific value from instances of some type.
  • Field Summary

    Fields inherited from interface org.skriptlang.skript.lang.converter.Converter

    ALL_CHAINING, ALLOW_UNSAFE_CASTS, NO_CHAINING, NO_LEFT_CHAINING, NO_RIGHT_CHAINING
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final R
    Deprecated, for removal: This API element is subject to removal in a future version.
    Convenience method to make getter implement converter
    abstract R
    get(A arg)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Gets a value from the given object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Getter

      public Getter()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • get

      @Nullable public abstract R get(A arg)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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)
      Deprecated, for removal: This API element is subject to removal in a future version.
      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.