A NamedDomainObjectContainer that allows to create domain objects with different types.
- the (base) type of domain objects in the containerType | Name and description |
---|---|
NamedDomainObjectContainer<U> |
containerWithType(Class<U> type) Creates a regular container that wraps the polymorphic container presenting all elements of a specified type. |
U |
create(String name, Class<U> type) Creates a domain object with the specified name and type, and adds it to the container. |
U |
create(String name, Class<U> type, Action<? super U> configuration) Creates a domain object with the specified name and type, adds it to the container, and configures it with the specified action. |
U |
maybeCreate(String name, Class<U> type) Looks for an item with the given name and type, creating and adding it to this container if it does not exist. |
Methods inherited from class | Name |
---|---|
interface NamedDomainObjectContainer |
configure, create, create, create, maybeCreate |
interface NamedDomainObjectSet |
findAll, matching, matching, withType |
interface NamedDomainObjectCollection |
add, addAll, addRule, addRule, findByName, getAsMap, getAt, getByName, getByName, getNamer, getNames, getRules, matching, matching, withType |
interface Set |
add, remove, equals, hashCode, clear, contains, isEmpty, iterator, size, toArray, toArray, spliterator, addAll, containsAll, removeAll, retainAll, stream, removeIf, parallelStream, forEach |
Creates a regular container that wraps the polymorphic container presenting all elements of a specified type.
type
- the type of the container elements
- the type of the container elementsCreates a domain object with the specified name and type, and adds it to the container.
name
- the name of the domain object to be createdtype
- the type of the domain object to be created
- the type of the domain object to be createdCreates a domain object with the specified name and type, adds it to the container, and configures it with the specified action.
name
- the name of the domain object to be createdtype
- the type of the domain object to be createdconfiguration
- an action for configuring the domain object
- the type of the domain object to be createdLooks for an item with the given name and type, creating and adding it to this container if it does not exist.
null
.name
- the name of the domain object to be createdtype
- the type of the domain object to be created
- the type of the domain object to be created