Class NamedStorage<T extends IName>
java.lang.Object
de.florianmichael.rclasses.pattern.storage.Storage<T>
de.florianmichael.rclasses.pattern.storage.named.NamedStorage<T>
- Type Parameters:
T- The type of the objects that are stored in this storage.
- Direct Known Subclasses:
SelectableNamedStorage
Implementation of a named storage. This storage is used to store objects that implement the
IName interface.-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new named storage with aCopyOnWriteArrayList.NamedStorage(Supplier<List<T>> list) Creates a new named storage with the given list. -
Method Summary
Modifier and TypeMethodDescription<V extends T>
VGets an object by its name. seegetByName(String, boolean)andINamefor more information.<V extends T>
VGets an object by its name. seegetByName(String)andINamefor more information.Methods inherited from class de.florianmichael.rclasses.pattern.storage.Storage
add, addBy, getByClass, getList, init, insert, remove, removeBy, setAddConsumer, setRemoveConsumer
-
Constructor Details
-
NamedStorage
public NamedStorage()Creates a new named storage with aCopyOnWriteArrayList. -
NamedStorage
Creates a new named storage with the given list.- Parameters:
list- The list.
-
-
Method Details
-
getByName
Gets an object by its name. seegetByName(String, boolean)andINamefor more information.- Type Parameters:
V- The type of the object.- Parameters:
name- The name.- Returns:
- The object.
-
getByName
Gets an object by its name. seegetByName(String)andINamefor more information.- Type Parameters:
V- The type of the object.- Parameters:
name- The name.ignoreCase- Whether the case should be ignored.- Returns:
- The object.
-