T
- the type of model object@Incubating public interface ModelSet<T> extends ManagedSet<T>
Managed
types may declare managed set properties.
Managed sets can only contain managed types.
Managed set objects cannot be mutated via the mutative methods of the Set
interface (e.g. Set.add(Object)
, Set.clear()
).
To add elements to the set, the create(Action)
method can be used.
Modifier and Type | Method and Description |
---|---|
void |
afterEach(Action<? super T> configAction)
Apply the given action to each set element just before it is considered to be realised.
|
void |
beforeEach(Action<? super T> configAction)
Apply the given action to each set element just after it is created.
|
void |
create(Action<? super T> action)
Declares a new set element, configured by the given action.
|
void create(Action<? super T> action)
create
in interface ManagedSet<T>
action
- the object configurationvoid beforeEach(Action<? super T> configAction)
The configuration action is equivalent in terms of lifecycle to Defaults
rule methods.
beforeEach
in interface ManagedSet<T>
configAction
- the object configurationvoid afterEach(Action<? super T> configAction)
The configuration action is equivalent in terms of lifecycle to Finalize
rule methods.
afterEach
in interface ManagedSet<T>
configAction
- the object configuration