Package com._1c.g5.v8.dt.compare.model
Class ObjectsTriple<T>
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.model.ObjectsTriple<T>
-
public class ObjectsTriple<T> extends Object
Represents a triple of objects of any type.
-
-
Constructor Summary
Constructors Constructor Description ObjectsTriple()
Creates an empty triple.ObjectsTriple(T main, T other, T ancestor)
Creates a triple of objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
T
get(ComparisonSide side)
Returns an object for the specified side.ComparisonSide
getOrigin()
Returns MAIN or OTHER side if the object presents only on the one of them.ComparisonSide
getSide()
Returns the side where the object presents if it presents only on the one of possible sides.int
hashCode()
void
set(ComparisonSide side, T object)
Sets the object for the specified side.
-
-
-
Method Detail
-
set
public void set(ComparisonSide side, T object)
Sets the object for the specified side.- Parameters:
side
- the side to set the object for, notnull
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, notnull
- 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
-
-