Search this API

y.layout.grid
Class PartitionCellId.Pair

java.lang.Object
  extended by y.layout.grid.PartitionCellId.Pair
All Implemented Interfaces:
java.lang.Comparable
Enclosing class:
PartitionCellId

public static final class PartitionCellId.Pair
extends java.lang.Object
implements java.lang.Comparable

This class represents a single partition cell, i.e., a pair consisting of a row and a column.

 
Your browser does not support SVG content.

Method Summary
 int compareTo(java.lang.Object o)
          Compares this PartitionCellId.Pair instance with a given other PartitionCellId.Pair instance.
 boolean equals(java.lang.Object o)
          Compares this PartitionCellId.Pair instance with a given other PartitionCellId.Pair instance based on their associated ColumnDescriptor and RowDescriptor instances.
 ColumnDescriptor getColumn()
          Returns the ColumnDescriptor associated with this partition cell.
 RowDescriptor getRow()
          Returns the RowDescriptor associated with this partition cell.
 int hashCode()
          Returns the hash code value for this PartitionCellId.Pair instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRow

public RowDescriptor getRow()
Returns the RowDescriptor associated with this partition cell.

Returns:
a RowDescriptor instance

getColumn

public ColumnDescriptor getColumn()
Returns the ColumnDescriptor associated with this partition cell.

Returns:
a ColumnDescriptor instance

compareTo

public int compareTo(java.lang.Object o)
Compares this PartitionCellId.Pair instance with a given other PartitionCellId.Pair instance.

The comparison is based on the indices of the rows and columns of the two pairs. A PartitionCellId.Pair is considered to be smaller than another pair if its row index is smaller than the row index of the other pair. If the row indices are equal, the PartitionCellId.Pair with the smaller column index is said to be smaller. Hence, two PartitionCellId.Pair instances are equal, if the row and column indices are equal.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - the PartitionCellId.Pair to be compared
Returns:
-1, 0 or 1 if this PartitionCellId.Pair is smaller than, equal to, or greater than the given other PartitionCellId.Pair instance

equals

public boolean equals(java.lang.Object o)
Compares this PartitionCellId.Pair instance with a given other PartitionCellId.Pair instance based on their associated ColumnDescriptor and RowDescriptor instances.

Overrides:
equals in class java.lang.Object
Parameters:
o - the given PartitionCellId.Pair instance
Returns:
true if the two objects are equal, false otherwise

hashCode

public int hashCode()
Returns the hash code value for this PartitionCellId.Pair instance.

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code value for this PartitionCellId.Pair instance

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.