Class VisualRelation

java.lang.Object
com.hp.lft.sdk.VisualRelation
All Implemented Interfaces:
CloneableObject, Cloneable

public class VisualRelation extends Object implements CloneableObject
Class representing Visual Relations Identifier (VRI) data.
Each VisualRelation class contains a reference to a test object, and up to three possible relations:
horizontal relation, vertical relation, and proximity relation.
The VisualRelation class can be initialized using the following builder pattern:

 new VisualRelation().setTestObject(someTestObject).setHorizontalRelation(HorizontalVisualRelation.RIGHT);
 
  • Constructor Details

    • VisualRelation

      public VisualRelation()
      Constructs a new Relation instance.
  • Method Details

    • getTestObject

      public TestObject getTestObject()
      Returns the related test object.
      Returns:
      the related test object.
    • setTestObject

      public VisualRelation setTestObject(TestObject testObject)
      Sets the related test object.
      Parameters:
      testObject - the related test object.
      Returns:
      the VisualRelation instance with the updated state (builder pattern).
    • getHorizontalRelation

      public HorizontalVisualRelation getHorizontalRelation()
      Returns the horizontal relation definition.
      Returns:
      the the horizontal relation definition.
    • setHorizontalRelation

      public VisualRelation setHorizontalRelation(HorizontalVisualRelation horizontalRelation)
      Sets the horizontal relation definition.
      Parameters:
      horizontalRelation - the horizontal relation definition.
      Returns:
      the Relation instance with the updated state (builder pattern).
    • getVerticalRelation

      public VerticalVisualRelation getVerticalRelation()
      Returns the vertical relation definition.
      Returns:
      the vertical relation definition.
    • setVerticalRelation

      public VisualRelation setVerticalRelation(VerticalVisualRelation verticalRelation)
      Sets the vertical relation definition.
      Parameters:
      verticalRelation - the vertical relation definition.
      Returns:
      the Relation instance with the updated state (builder pattern).
    • getProximityRelation

      public ProximityVisualRelation getProximityRelation()
      Returns the proximity relation info.
      Returns:
      the proximity relation info.
    • setProximityRelation

      public VisualRelation setProximityRelation(ProximityVisualRelation proximityRelation)
      Sets the proximity relation definition.
      Parameters:
      proximityRelation - the proximity relation definition.
      Returns:
      the Relation instance with the updated state (builder pattern).
    • clone

      public final Object clone() throws CloneNotSupportedException
      Description copied from interface: CloneableObject
      Returns a clone of this instance.
      Specified by:
      clone in interface CloneableObject
      Overrides:
      clone in class Object
      Returns:
      a clone of this instance.
      Throws:
      CloneNotSupportedException - if the instance cannot be cloned.