Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jchrest.lib
Class ItemSquarePattern

    java.lang.Object
      jchrest.lib.Pattern
          jchrest.lib.PrimitivePattern
              jchrest.lib.ItemSquarePattern

    public class ItemSquarePattern

extends PrimitivePattern

The ItemSquarePattern is a type of PrimitivePattern used to hold objects places on a square array. The item-on-square is treated as a single object. Instances of this class are immutable.

Constructor Summary
`ItemSquarePattern(java.lang.String item, int column, int row)` Constructor takes a string to identify the item, and a column and row to identify the square.

Method Summary
`boolean` | `equalPrimitive(PrimitivePattern pattern)` Two ItemSquarePatterns are only equal if all their parts are the same.
`int` | `getColumn()` Accessor method for the column.
`java.lang.String` | `getItem()` Accessor method for the stored item.
`int` | `getRow()` Accessor method for the row.
`boolean` | `matches(Pattern givenPattern)` Two ItemSquarePatterns only match if they are the same.
`java.lang.String` | `toString()` Return a string representation of the item on square.

Methods inherited from class jchrest.lib.Pattern
`makeActionList, makeNumber, makeString, makeVerbalList, makeVerbalList, makeVisualList, makeVisualList`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ItemSquarePattern

    public ItemSquarePattern(java.lang.String item,
                             int column,
                             int row)

  Constructor takes a string to identify the item, and a column and row to identify the square.

Method Detail

### getItem

    public java.lang.String getItem()

  Accessor method for the stored item.

### getColumn

    public int getColumn()

  Accessor method for the column.

### getRow

    public int getRow()

  Accessor method for the row.

### equalPrimitive

    public boolean equalPrimitive(PrimitivePattern pattern)

  Two ItemSquarePatterns are only equal if all their parts are the same.

  Specified by:
    `equalPrimitive` in class `PrimitivePattern`

### matches

    public boolean matches(Pattern givenPattern)

  Two ItemSquarePatterns only match if they are the same.

  Specified by:
    `matches` in class `Pattern`

### toString

    public java.lang.String toString()

  Return a string representation of the item on square.

  Specified by:
    `toString` in class `Pattern`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD