Class SymmetricPair

java.lang.Object
com.itextpdf.pdfoptimizer.util.SymmetricPair

public class SymmetricPair extends Object
Storage for two objects without strict order.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SymmetricPair(Object obj1, Object obj2)
    Creates a new instance of the class with two provided objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Performs equality check for this and that pairs.
    int
    Performs a symmetrical hash calculation which depends on hashes of stored objects but does not depend on the order of objects.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SymmetricPair

      public SymmetricPair (Object obj1, Object obj2)
      Creates a new instance of the class with two provided objects. The order of the objects is not significant.
      Parameters:
      obj1 - is one object to store
      obj2 - is another object
  • Method Details

    • equals

      public boolean equals (Object o)
      Performs equality check for this and that pairs. Two SymmetricPairs will be considered as equal if and only if one object of the first pair is equal to one object of the second pair and another object of the first pair is equal to another object of the second pair. Order of objects is not significant.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Performs a symmetrical hash calculation which depends on hashes of stored objects but does not depend on the order of objects.
      Overrides:
      hashCode in class Object