Class VersionHandle<T>

java.lang.Object
com.cryptomorin.xseries.reflection.VersionHandle<T>
Type Parameters:
T - the type of object to check.

public final class VersionHandle<T> extends Object
Provides objects based on the current version of the server (XReflection.supports(int, int, int)), it's mostly useful for primitive values, for reflection you should use the specialized XReflection class instead.
  • Constructor Details

    • VersionHandle

      public VersionHandle(int version, int patch, Callable<T> handle)
    • VersionHandle

      public VersionHandle(int version, Callable<T> handle)
  • Method Details

    • v

      public VersionHandle<T> v(int version, T handle)
    • v

      public VersionHandle<T> v(int version, int patch, Callable<T> handle)
    • v

      public VersionHandle<T> v(int version, int patch, T handle)
    • orElse

      public T orElse(T handle)
      If none of the previous version checks matched, it'll return this object.
    • orElse

      public T orElse(Callable<T> handle)