|
jInfer | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.mff.ksi.jinfer.base.utils.EqualityUtils
public final class EqualityUtils
Utility class to test equalities in XML representation.
See the integer flags used to specified which features to ignore while comparing. Example usage:
EqualityUtils.sameElements(e1, e2, EqualityUtils.IGNORE_METADATA | EqualityUtils.IGNORE_NAME)
to ignore metadata and names of provided elements.
Field Summary | |
---|---|
static int |
IGNORE_ATTRIBUTES
While comparing, ignore Element.getAttributes() . |
static int |
IGNORE_CONTENT
While comparing, ignore SimpleData.getContent() . |
static int |
IGNORE_CONTENT_TYPE
While comparing, ignore SimpleData.getContentType() . |
static int |
IGNORE_CONTEXT
While comparing, ignore AbstractNamedNode.getContext() . |
static int |
IGNORE_METADATA
While comparing, ignore AbstractNamedNode.getMetadata() . |
static int |
IGNORE_NAME
While comparing, ignore AbstractNamedNode.getName() . |
static int |
IGNORE_SUBNODES
While comparing, ignore Element.getSubnodes() . |
Method Summary | |
---|---|
static boolean |
sameElements(Element e1,
Element e2,
int ignore)
Compares two elements, ignoring specified features. |
static boolean |
sameIntervals(RegexpInterval i1,
RegexpInterval i2)
Compare two intervals if they have equal minimum and maximum. |
static boolean |
sameSimpleData(SimpleData sd1,
SimpleData sd2,
int ignore)
Compares two simple data, ignoring specified features. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int IGNORE_NAME
AbstractNamedNode.getName()
.
public static final int IGNORE_CONTEXT
AbstractNamedNode.getContext()
.
public static final int IGNORE_METADATA
AbstractNamedNode.getMetadata()
.
public static final int IGNORE_ATTRIBUTES
Element.getAttributes()
.
public static final int IGNORE_SUBNODES
Element.getSubnodes()
.
public static final int IGNORE_CONTENT_TYPE
SimpleData.getContentType()
.
public static final int IGNORE_CONTENT
SimpleData.getContent()
.
Method Detail |
---|
public static boolean sameElements(Element e1, Element e2, int ignore)
e1
- Element 1 to compare.e2
- Element 2 to compare.ignore
- Bitmap of flags to compare. Combine multiple flags with a
bitwise OR (pipe character "|").
public static boolean sameSimpleData(SimpleData sd1, SimpleData sd2, int ignore)
sd1
- Simple data 1 to compare.sd2
- Simple data 2 to compare.ignore
- Bitmap of flags to compare. Combine multiple flags with a
bitwise OR (pipe character "|").
public static boolean sameIntervals(RegexpInterval i1, RegexpInterval i2)
i1
- First interval to be compared.i2
- Second interval to be compared.
|
jInfer | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |