C
- The plural container type of represented by the change modelV
- The element type of the container represented by the change modelChangeModel<C>
MapChangeModel<K,V>
public interface PluralChangeModel<C,V> extends ChangeModel<C>
ChangeModel.ChangeKind
Modifier and Type | Method | Description |
---|---|---|
<K,E> java.util.List<MapChangeModel<K,E>> |
get(MapAttribute<V,K,E> attribute) |
Returns the change models for the elements attribute.
|
<E,C extends java.util.Collection<E>> |
get(PluralAttribute<V,C,E> attribute) |
Returns the change models for the elements attribute.
|
<X> java.util.List<SingularChangeModel<X>> |
get(SingularAttribute<V,X> attribute) |
Returns the change models for the elements attribute.
|
<X> java.util.List<? extends ChangeModel<X>> |
get(java.lang.String attributePath) |
Returns the change models for the elements attribute.
|
java.util.List<SingularChangeModel<V>> |
getAddedElements() |
Returns the change models of all added elements.
|
java.util.List<SingularChangeModel<V>> |
getElementChanges() |
Returns the change models of all added, removed or mutated elements.
|
java.util.List<SingularChangeModel<V>> |
getMutatedElements() |
Returns the change models of all mutated elements.
|
java.util.List<SingularChangeModel<V>> |
getRemovedElements() |
Returns the change models of all removed elements.
|
boolean |
isChanged(java.lang.String attributePath) |
Returns whether the target attribute path was changed by updating or mutating it,
but still has the same identity regarding parent objects it is contained in.
|
boolean |
isDirty(java.lang.String attributePath) |
Returns whether the change model for the attribute is dirty.
|
getCurrentState, getInitialState, getKind, isDirty
java.util.List<SingularChangeModel<V>> getElementChanges()
java.util.List<SingularChangeModel<V>> getAddedElements()
java.util.List<SingularChangeModel<V>> getRemovedElements()
java.util.List<SingularChangeModel<V>> getMutatedElements()
<X> java.util.List<? extends ChangeModel<X>> get(java.lang.String attributePath)
X
- The element type of the singular attributeattributePath
- The name of the attribute or path to sub-attributejava.lang.IllegalStateException
- if invoked on a change model that corresponds to a basic attributejava.lang.IllegalArgumentException
- if attribute of the given name does not otherwise exist<X> java.util.List<SingularChangeModel<X>> get(SingularAttribute<V,X> attribute)
X
- The element type of the singular attributeattribute
- The singular attribute<E,C extends java.util.Collection<E>> java.util.List<PluralChangeModel<C,E>> get(PluralAttribute<V,C,E> attribute)
C
- The container type of the plural attributeE
- The value type of the plural attributeattribute
- The collection attribute<K,E> java.util.List<MapChangeModel<K,E>> get(MapAttribute<V,K,E> attribute)
K
- The key type of the map attributeE
- The value type of the map attributeattribute
- The map attributeboolean isDirty(java.lang.String attributePath)
get(attributePath).isDirty()
.attributePath
- The name of the attribute or path to sub-attributejava.lang.IllegalStateException
- if invoked on a change model that corresponds to a basic attributejava.lang.IllegalArgumentException
- if attribute of the given name does not otherwise existboolean isChanged(java.lang.String attributePath)
true
. Mutations or updates to the target object also cause true
to be returned.
This method always returns true
when the collection was altered i.e. objects removed or added.
In all other cases, this method returns false
.attributePath
- The name of the attribute or path to sub-attributejava.lang.IllegalStateException
- if invoked on a change model that corresponds to a basic attributejava.lang.IllegalArgumentException
- if attribute of the given name does not otherwise existCopyright © 2014–2019 Blazebit. All rights reserved.