Class Table.Merge

java.lang.Object
com.codename1.wordprocessing.Table.Merge
Enclosing class:
Table

public static final class Table.Merge extends Object
A rectangular range of cells shown as one, anchored at its top-left cell.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    The anchor column.
    final int
    The number of columns spanned, at least one.
    final int
    The anchor row.
    final int
    The number of rows spanned, at least one.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Merge(int row, int column, int rows, int columns)
    Creates a merge.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(int r, int c)
    Whether the range contains a cell.
    boolean
    Two merges are equal when they cover the same range.
    int
    A hash consistent with equals.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • row

      public final int row
      The anchor row.
    • column

      public final int column
      The anchor column.
    • rows

      public final int rows
      The number of rows spanned, at least one.
    • columns

      public final int columns
      The number of columns spanned, at least one.
  • Constructor Details

    • Merge

      public Merge(int row, int column, int rows, int columns)

      Creates a merge.

      Parameters
      • row: the anchor row

      • column: the anchor column

      • rows: rows spanned

      • columns: columns spanned

  • Method Details

    • contains

      public boolean contains(int r, int c)

      Whether the range contains a cell.

      Parameters
      • r: the row

      • c: the column

      Returns

      true when inside

    • equals

      public boolean equals(Object o)

      Two merges are equal when they cover the same range.

      Parameters
      • o: the other object
      Returns

      true when equal

      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()

      A hash consistent with equals.

      Returns

      the hash

      Overrides:
      hashCode in class Object