Top Description Fields Constructors Methods
org.hibernate.internal.util

public Class MutableObject<T>

extends Object
Class Inheritance
Imports
java.util.function.BiConsumer, .Consumer, .Supplier

Mutable object reference. Mainly useful with anonymous code blocks and lambdas.
Authors
Steve Ebersole, Andrea Boriero

Field Summary

Modifier and TypeField and Description
private T

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public T
get()

public boolean
public boolean
public void
set(T reference)

public void
set(T reference, Consumer<T> existingConsumer)

public void
set(T reference, BiConsumer<T, T> existingConsumer)

public void
setIfNot(T reference)

public void
setIfNot(T reference, Supplier<RuntimeException> overwriteHandler)

public void
setIfNot(Supplier<T> referenceSupplier)

public void
setIfNot(Supplier<T> referenceSupplier, Supplier<RuntimeException> overwriteHandler)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

referenceback to summary
private T reference

Constructor Detail

MutableObjectback to summary
public MutableObject()

Method Detail

getback to summary
public T get()
isNotSetback to summary
public boolean isNotSet()
isSetback to summary
public boolean isSet()
setback to summary
public void set(T reference)
setback to summary
public void set(T reference, Consumer<T> existingConsumer)
setback to summary
public void set(T reference, BiConsumer<T, T> existingConsumer)
setIfNotback to summary
public void setIfNot(T reference)
setIfNotback to summary
public void setIfNot(T reference, Supplier<RuntimeException> overwriteHandler)
setIfNotback to summary
public void setIfNot(Supplier<T> referenceSupplier)
setIfNotback to summary
public void setIfNot(Supplier<T> referenceSupplier, Supplier<RuntimeException> overwriteHandler)