Package org.hibernate.internal.util
Class MutableObject<T>
- java.lang.Object
-
- org.hibernate.internal.util.MutableObject<T>
-
public class MutableObject<T> extends Object
Mutable object reference. Mainly useful with anonymous code blocks and lambdas.
-
-
Constructor Summary
Constructors Constructor Description MutableObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
get()
boolean
isNotSet()
boolean
isSet()
void
set(T reference)
void
set(T reference, BiConsumer<T,T> existingConsumer)
void
set(T reference, Consumer<T> existingConsumer)
void
setIfNot(Supplier<T> referenceSupplier)
void
setIfNot(Supplier<T> referenceSupplier, Supplier<RuntimeException> overwriteHandler)
void
setIfNot(T reference)
void
setIfNot(T reference, Supplier<RuntimeException> overwriteHandler)
-
-
-
Method Detail
-
get
public T get()
-
isSet
public boolean isSet()
-
isNotSet
public boolean isNotSet()
-
set
public void set(T reference)
-
set
public void set(T reference, BiConsumer<T,T> existingConsumer)
-
setIfNot
public void setIfNot(T reference)
-
setIfNot
public void setIfNot(T reference, Supplier<RuntimeException> overwriteHandler)
-
setIfNot
public void setIfNot(Supplier<T> referenceSupplier, Supplier<RuntimeException> overwriteHandler)
-
-