Interface IdentityComparable
- All Known Subinterfaces:
NodeName
- All Known Implementing Classes:
AdjacentTextNodeMerger, AnalyzeString, AncestorQualifiedPattern, AnchorPattern, AndExpression, AnyURIValue, ApplyImports, ApplyNextMatchingTemplate, ApplyTemplates, ArithmeticExpression, ArithmeticExpression10, Assignation, AtomicSequenceConverter, AtomicValue, Atomizer, AttributeCreator, AttributeGetter, AxisExpression, Base64BinaryValue, BasePatternWithPredicate, BigDecimalValue, BigIntegerValue, BinaryExpression, Block, BooleanExpression, BooleanExpressionPattern, BooleanValue, BreakInstr, CalendarValue, CallTemplate, CardinalityChecker, CastableExpression, CastExpression, CastingExpression, Choose, CodedName, Comment, CompareToConstant, CompareToIntegerConstant, CompareToStringConstant, ComponentTracer, ComputedAttribute, ComputedElement, ConditionalBlock, ConditionalSorter, ConsumingOperand, ContextItemExpression, Copy, CopyOf, CurrentGroupCall, CurrentGroupingKeyCall, CurrentItemExpression, DateTimeValue, DateValue, DayTimeDurationValue, DecimalValue, Doctype, DocumentInstr, DocumentSorter, DoubleValue, DurationValue, EagerLetExpression, ElementCreator, EmptyTextNodeRemover, EquivalenceComparison, ErrorExpression, EvaluateInstr, ExceptPattern, Expression, FilterExpression, FingerprintedQName, FirstItemExpression, FixedAttribute, FixedElement, FloatValue, FLWORExpression, ForEach, ForEachGroup, ForExpression, Fork, ForMemberExpression, FunctionCall, FunctionLiteral, FunctionSequenceCoercer, GDateValue, GDayValue, GeneralComparison, GeneralComparison10, GeneralComparison20, GeneralNodePattern, GeneralPositionalPattern, GlobalVariableReference, GMonthDayValue, GMonthValue, GYearMonthValue, GYearValue, HexBinaryValue, HomogeneityChecker, IdentityComparison, InstanceOfExpression, Instruction, Int64Value, IntegerRangeTest, IntegerValue, IntegratedFunctionCall, IntersectPattern, IsLastExpression, ItemChecker, ItemTypePattern, IterateInstr, JAXPVariableReference, LastItemExpression, LetExpression, Literal, LocalParam, LocalParamBlock, LocalVariableReference, LookupAllExpression, LookupExpression, MergeInstr, MessageInstr, NameOfNode, NamespaceConstructor, NegateExpression, NextIteration, NextMatch, NodeSetPattern, NodeTestPattern, NoNamespaceName, NotationValue, NumberInstruction, NumberSequenceFormatter, NumericValue, OnEmptyExpr, OnNonEmptyExpr, OrExpression, OuterForExpression, ParentNodeConstructor, PartialApply, Pattern, PatternMatchExpression, PatternThatSetsCurrent, ProcessingInstruction, PseudoExpression, QNameValue, QualifiedNameValue, QuantifiedExpression, RangeExpression, ResultDocument, RootExpression, SequenceInstr, SimpleExpression, SimpleNodeConstructor, SimplePositionalPattern, SimpleStepExpression, SingleItemFilter, SingletonAtomizer, SingletonIntersectExpression, SlashExpression, SortExpression, SortKeyDefinition, SortKeyDefinitionList, SourceDocument, SquareArrayConstructor, StaticFunctionCall, StreamingFunctionArgumentPattern, StringLiteral, StringValue, StructuredQName, SubscriptExpression, SuppliedParameterReference, SystemFunctionCall, SystemFunctionCall.Optimized, TailCallLoop, TailExpression, TimeValue, TraceExpression, TryCatch, TupleExpression, UnaryExpression, UnionPattern, UniversalPattern, UntypedSequenceConverter, UseAttributeSet, UserFunctionCall, UserFunctionReference, ValueComparison, ValueOf, VariableReference, VennExpression, VennPattern, WherePopulated, XPathFunctionCall, YearMonthDurationValue
public interface IdentityComparable
The IdentityComparable class provides a way to compare objects for strong equality.
In some cases it may test for Java-level object identity, but this is not essential. For example,
with date/time values it checks that the values are not only equal according to the XPath rules,
but also have the same timezone (or absence of a timezone).
-
Method Summary
Modifier and TypeMethodDescriptionintGet a hashCode that offers the guarantee that if A.isIdentical(B), then A.identityHashCode() == B.identityHashCode()booleanisIdentical(IdentityComparable other) Determine whether two IdentityComparable objects are identical.
-
Method Details
-
isIdentical
Determine whether two IdentityComparable objects are identical. This is a stronger test than equality (even schema-equality); for example two dateTime values are not identical unless they are in the same timezone.- Parameters:
other- the value to be compared with- Returns:
- true if the two values are identical, false otherwise
-
identityHashCode
int identityHashCode()Get a hashCode that offers the guarantee that if A.isIdentical(B), then A.identityHashCode() == B.identityHashCode()- Returns:
- a hashCode suitable for use when testing for identity.
-