Package com.storedobject.ui.util
Class ObjectAdder<O extends StoredObject>
java.lang.Object
com.storedobject.ui.util.ObjectAdder<O>
- Type Parameters:
O- Type of object.
A utility editor class to dynamically create and add a new
StoredObject instance to an
ObjectInput field.- Author:
- Syam
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd()Create and add a new instance via the associated editor.static <OT extends StoredObject>
ObjectAdder<OT> create(Consumer<OT> consumer, ObjectInput<OT> field) Static method to create the adder instance.
-
Method Details
-
create
public static <OT extends StoredObject> ObjectAdder<OT> create(Consumer<OT> consumer, ObjectInput<OT> field) Static method to create the adder instance.- Type Parameters:
OT- Type of object being created.- Parameters:
consumer- Listener to inform.field- TheObjectInputfield.- Returns:
- Adder instance.
-
add
public void add()Create and add a new instance via the associated editor.
-