Interface IFieldDiff
- All Known Implementing Classes:
FieldDiff
public interface IFieldDiff
Object representation of change in one field of IPObject.
- Author:
- dobisekm
-
Method Summary
Modifier and TypeMethodDescriptiongetAdded()
getAfter()
boolean
Call this method to determine, whether thegetAdded()
/getRemoved()
(for Collections) orgetBefore()
/getAfter()
(for scalars) method pair is valid.
-
Method Details
-
getFieldName
String getFieldName()- Returns:
- Name of the dield represented by this diff.
-
isCollection
boolean isCollection()Call this method to determine, whether thegetAdded()
/getRemoved()
(for Collections) orgetBefore()
/getAfter()
(for scalars) method pair is valid.- Returns:
- the name of the field
-
getBefore
Object getBefore()- Returns:
- The field value before (for scalars only).
- Throws:
UnsupportedOperationException
- ifisCollection()
istrue
.
-
getAfter
Object getAfter()- Returns:
- The field value after (for scalars only).
- Throws:
UnsupportedOperationException
- ifisCollection()
istrue
.
-
getAdded
Collection getAdded()- Returns:
- Collection of values added into this field's collection
Returns
Collections.singletonList(getAfter())
for scalar fields.
-
getRemoved
Collection getRemoved()- Returns:
- Immutable collection of valued removed from this field's collection.
Returns
Collections.singletonList(getBefore())
for scalar fields.
-