Class Ref<T>

java.lang.Object
alexiil.mc.lib.attributes.misc.Ref<T>
All Implemented Interfaces:
Reference<T>

public final class Ref<T>
extends java.lang.Object
implements Reference<T>
A simple Reference that holds the value directly in the field obj, and accepts any new value.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    T obj  
  • Constructor Summary

    Constructors 
    Constructor Description
    Ref​(T obj)  
  • Method Summary

    Modifier and Type Method Description
    T get()  
    boolean isValid​(T value)  
    boolean set​(T value)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface alexiil.mc.lib.attributes.misc.Reference

    asDestroyable, set
  • Field Details

    • obj

      public T obj
  • Constructor Details

    • Ref

      public Ref​(T obj)
  • Method Details