Package alexiil.mc.lib.attributes.misc
Class DestroyableRef<T>
java.lang.Object
alexiil.mc.lib.attributes.misc.DestroyableRef<T>
- All Implemented Interfaces:
- 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 Details- 
DestroyableRef
 
- 
- 
Method Details- 
destroypublic void destroy()Preventsset(Object)from returning true in the future.
- 
get- Specified by:
- getin interface- Reference<T>
- Returns:
- The object referenced. Note that you should generally not modify the returned value directly - instead
         copy it before passing it to Reference.set(Object)orReference.isValid(Object)to see if your modifications are permitted.
 
- 
set
- 
isValid- Specified by:
- isValidin interface- Reference<T>
- Returns:
- True if Reference.set(Object)was called with the same value.
 
 
-