Class ObjectsTriple<T>

java.lang.Object
com._1c.g5.v8.dt.compare.model.ObjectsTriple<T>
Direct Known Subclasses:
ComparisonDataSourceDescriptorTriple, ComparisonDataSourceTriple

public class ObjectsTriple<T> extends Object
Represents a triple of objects of any type.
  • Constructor Details

    • ObjectsTriple

      public ObjectsTriple()
      Creates an empty triple.
    • ObjectsTriple

      public ObjectsTriple(T main, T other, T ancestor)
      Creates a triple of objects.
      Parameters:
      main - the main object
      other - the other object
      ancestor - the ancestor object
  • Method Details

    • set

      public void set(ComparisonSide side, T object)
      Sets the object for the specified side.
      Parameters:
      side - the side to set the object for, not null
      object - the object to set
    • get

      public T get(ComparisonSide side)
      Returns an object for the specified side.
      Parameters:
      side - the side to get the object for, not null
      Returns:
      the object on the side, may be null
    • getSide

      public ComparisonSide getSide()
      Returns the side where the object presents if it presents only on the one of possible sides.
      Returns:
      the side where the object presents or null if it presents on more than one side
    • getOrigin

      public ComparisonSide getOrigin()
      Returns MAIN or OTHER side if the object presents only on the one of them. Fully ignores object's presence on COMMON_ANCESTOR side.
      Returns:
      the MAIN or OTHER side or null if it presents on both of them or doesn't present on any of them
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object