java.lang.Object
dev.metaschema.core.metapath.item.node.NodeComparators
Provides methods for comparing nodes according to the
Metapath
specification.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleancompareAsFlag(IFlagNodeItem item1, IFlagNodeItem item2, DynamicContext dynamicContext) Compare two flag node items for equality.static booleancompareModelNodeItem(IModelNodeItem<?, ?> item1, IModelNodeItem<?, ?> item2, DynamicContext dynamicContext) Compare two node items for equality.static booleancompareNodeItem(INodeItem item1, INodeItem item2, DynamicContext dynamicContext) Compare two node items for equality.
-
Method Details
-
compareNodeItem
public static boolean compareNodeItem(@NonNull INodeItem item1, @NonNull INodeItem item2, @NonNull DynamicContext dynamicContext) Compare two node items for equality.- Parameters:
item1- the first item to compareitem2- the second item to comparedynamicContext- used to provide evaluation information, including the implicit timezone- Returns:
trueif both node items are the same type and have the same flag and model members, orfalseotherwise
-
compareModelNodeItem
public static boolean compareModelNodeItem(@NonNull IModelNodeItem<?, ?> item1, @NonNull IModelNodeItem<?, ?> item2, @NonNull DynamicContext dynamicContext) Compare two node items for equality.- Parameters:
item1- the first item to compareitem2- the second item to comparedynamicContext- used to provide evaluation information, including the implicit timezone- Returns:
- a negative integer, zero, or a positive integer if the first argument is less than, equal to, or greater than the second.
-
compareAsFlag
public static boolean compareAsFlag(@NonNull IFlagNodeItem item1, @NonNull IFlagNodeItem item2, @NonNull DynamicContext dynamicContext) Compare two flag node items for equality.- Parameters:
item1- the first item to compareitem2- the second item to comparedynamicContext- used to provide evaluation information, including the implicit timezone- Returns:
trueif both flags have the same name and value, orfalseotherwise
-