Class DestroyableRef<T>

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

public final class DestroyableRef<T>
extends java.lang.Object
implements Reference<T>
A Reference that can be modified until destroy() is called, after which all calls to set(Object) and isValid(Object) will return false.
  • Constructor Summary

    Constructors 
    Constructor Description
    DestroyableRef​(Reference<T> ref)  
  • Method Summary

    Modifier and Type Method Description
    void destroy()
    Prevents set(Object) from returning true in the future.
    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