Interface IdentityComparable

All Known Subinterfaces:
NodeName
All Known Implementing Classes:
AdjacentTextNodeMerger, AnalyzeString, AncestorQualifiedPattern, AnchorPattern, AndExpression, AnyURIValue, ApplyImports, ApplyNextMatchingTemplate, ApplyTemplates, ArithmeticExpression, ArithmeticExpression10, ArrayInstr, Assign, Assignation, AtomicSequenceConverter, AtomicValue, Atomizer, AttributeCreator, AttributeGetter, AxisExpression, Base64BinaryValue, BasePatternWithPredicate, BasicUpdatingExpression, 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, CopyModifyExpression, CopyOf, CurrentGroupCall, CurrentGroupingKeyCall, CurrentGroupPattern, CurrentItemExpression, DateTimeValue, DateValue, DayTimeDurationValue, DecimalValue, DeepUpdate, DefaultedArgumentExpression, DefaultedArgumentExpression.DefaultCollationArgument, DeleteExpression, Doctype, DocumentInstr, DocumentSorter, DoInstr, DoubleValue, DurationValue, DynamicFunctionCall, EagerLetExpression, ElementCreator, EmptyTextNodeRemover, ErrorExpression, EvaluateInstr, ExceptPattern, Expression, FilterExpression, FingerprintedQName, FirstItemExpression, FixedAttribute, FixedElement, FloatValue, FLWORExpression, ForEach, ForEachGroup, ForExpression, Fork, FunctionCall, FunctionLiteral, FunctionSequenceCoercer, GDateValue, GDayValue, GeneralComparison, GeneralComparison10, GeneralComparison20, GeneralEqualityEE, GeneralNodePattern, GeneralPositionalPattern, GlobalVariableReference, GMonthDayValue, GMonthValue, GYearMonthValue, GYearValue, HexBinaryValue, HomogeneityChecker, IdentityComparison, IndexedFilterExpression, InsertExpression, InstanceOfExpression, Instruction, Int64Value, IntegerRangeTest, IntegerValue, IntegratedFunctionCall, IntersectPattern, IsLastExpression, ItemChecker, ItemTypePattern, IterateInstr, JavaExtensionFunctionCall, JavaExtensionLibrary.UnresolvedExtensionFunctionCall, JAXPVariableReference, LastItemExpression, LetExpression, Literal, LocalParam, LocalParamBlock, LocalVariableReference, LookupAllExpression, LookupExpression, MergeInstr, MessageInstr, MultithreadedForEach, NameOfNode, NamespaceConstructor, NegateExpression, NextIteration, NextMatch, NodeSetPattern, NodeTestPattern, NoNamespaceName, NotationValue, NumberInstruction, NumberSequenceFormatter, NumericValue, ObjectLookupExpression, OnEmptyExpr, OnNonEmptyExpr, OrExpression, OuterForExpression, ParentNodeConstructor, PartialApply, Pattern, PatternThatSetsCurrent, ProcessingInstruction, PseudoExpression, QNameValue, QualifiedNameValue, QuantifiedExpression, RangeExpression, RenameExpression, ReplaceNodeExpression, ReplaceValueExpression, ResultDocument, RootExpression, SequenceInstr, SimpleExpression, SimpleNodeConstructor, SimplePositionalPattern, SimpleStepExpression, SingleItemFilter, SingletonAtomizer, SingletonIntersectExpression, SlashExpression, SortExpression, SortKeyDefinition, SortKeyDefinitionList, SourceDocument, SQLConnect.ConnectInstruction, SquareArrayConstructor, StaticFunctionCall, StreamingFunctionArgumentPattern, StreamInstr, StringLiteral, StringValue, StructuredQName, SubscriptExpression, SuppliedParameterReference, SwitchCaseComparison, SwitchExpression, SystemFunctionCall, SystemFunctionCall.Optimized, TabulateMaps, TailCallLoop, TailExpression, TimeValue, TraceExpression, TryCatch, TupleExpression, UnaryExpression, UnionPattern, UniversalPattern, UntypedSequenceConverter, UseAttributeSet, UserFunctionCall, UserFunctionReference, ValueComparison, ValueOf, VariableReference, VennExpression, VennPattern, WherePopulated, While, 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 Type
    Method
    Description
    int
    Get a hashCode that offers the guarantee that if A.isIdentical(B), then A.identityHashCode() == B.identityHashCode()
    boolean
    Determine whether two IdentityComparable objects are identical.
  • Method Details

    • isIdentical

      boolean isIdentical(IdentityComparable other)
      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.