Interface Aggregate
public interface Aggregate
An object with dependencies.
By default, Aggregates have no dependencies.
- Author:
- Laird Nelson
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SequencedSet<Assignment<?>> An immutable, emptySequencedSetofAssignments.static final SequencedSet<AttributedElement> An immutable, emptySequencedSetofAttributedElements. -
Method Summary
Modifier and TypeMethodDescriptiondefault SequencedSet<? extends Assignment<?>> assign(Function<? super AttributedType, ?> r) A convenience method that assigns a contextual reference to each of thisAggregate'sAttributedElementinstances and returns the resultingSequencedSetofAssignments.default SequencedSet<AttributedElement> Returns an immutableSequencedSetofAttributedElementinstances.
-
Field Details
-
EMPTY_ASSIGNMENTS
An immutable, emptySequencedSetofAssignments. -
EMPTY_DEPENDENCIES
An immutable, emptySequencedSetofAttributedElements.
-
-
Method Details
-
dependencies
Returns an immutableSequencedSetofAttributedElementinstances.- Returns:
- an immutable
SequencedSetofAttributedElementinstances; nevernull - See Also:
-
assign
A convenience method that assigns a contextual reference to each of thisAggregate'sAttributedElementinstances and returns the resultingSequencedSetofAssignments.Typically there is no need to override this method.
- Parameters:
r- aFunctionthat retrieves a contextual reference suitable for anAttributedType; ifdependencies()returns a non-emptySequencedSetthen this argument must not benull- Returns:
- an immutable
SequencedSetofAssignmentinstances; nevernull - Throws:
NullPointerException- ifrisnull
-