public class DiffElementImpl extends Object implements DiffElement
| Constructor and Description |
|---|
DiffElementImpl(Projection projection) |
| Modifier and Type | Method and Description |
|---|---|
void |
asAdded() |
void |
asExists(boolean hierarhyEqual,
boolean childrenEqual,
boolean selfEqual) |
void |
asOriginal(boolean exists) |
void |
asRemoved() |
DiffStatus |
getDiffStatus()
Difference status of the element compared to original one.
|
Projection |
getProjection()
Projection of the element.
|
boolean |
isChildrenEqual()
Shows whether hierarchy and properties of all children are the same for compared and original elements.
|
boolean |
isHierarhyEqual()
Shows whether hierarchy of all children, regardless of their properties, are the same for compared and original
elements.
|
boolean |
isSelfEqual()
Shows whether compared and original elements have the same properties.
|
public DiffElementImpl(Projection projection)
public DiffStatus getDiffStatus()
DiffElementException: for an original element DiffStatus has other meaning.
DiffStatus.ORIGINAL shows that it is present in original dataDiffStatus.ORIGINAL_ABSENT shows that it is absent in original data but exists in at least one
comparing datagetDiffStatus in interface DiffElementpublic boolean isHierarhyEqual()
DiffElementisHierarhyEqual in interface DiffElementtrue if hierarchy of children are the samepublic boolean isChildrenEqual()
DiffElementisChildrenEqual in interface DiffElementtrue if hierarchy and properties of children are completely the samepublic boolean isSelfEqual()
DiffElementisSelfEqual in interface DiffElementtrue if properties are the samepublic Projection getProjection()
DiffElementIn case if some comparing data has no such element it will return null.
getProjection in interface DiffElementpublic void asAdded()
public void asRemoved()
public void asExists(boolean hierarhyEqual,
boolean childrenEqual,
boolean selfEqual)
public void asOriginal(boolean exists)
Copyright © 2004–2019 OpenL Tablets. All rights reserved.