Package com._1c.g5.v8.dt.compare.model
Class ObjectsTriple<T>
java.lang.Object
com._1c.g5.v8.dt.compare.model.ObjectsTriple<T>
- Direct Known Subclasses:
ComparisonDataSourceDescriptorTriple
,ComparisonDataSourceTriple
Represents a triple of objects of any type.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty triple.ObjectsTriple
(T main, T other, T ancestor) Creates a triple of objects. -
Method Summary
Modifier and TypeMethodDescriptionboolean
get
(ComparisonSide side) Returns an object for the specified side.Returns MAIN or OTHER side if the object presents only on the one of them.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.
-
Constructor Details
-
ObjectsTriple
public ObjectsTriple()Creates an empty triple. -
ObjectsTriple
Creates a triple of objects.- Parameters:
main
- the main objectother
- the other objectancestor
- the ancestor object
-
-
Method Details
-
set
Sets the object for the specified side.- Parameters:
side
- the side to set the object for, notnull
object
- the object to set
-
get
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
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
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() -
equals
-