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

## umontreal.iro.lecuyer.xmlbind
Class SourceSubset2D

    java.lang.Object
      umontreal.iro.lecuyer.xmlbind.SourceSubset2D

All Implemented Interfaces:
  Closeable, SourceArray2D

    public class SourceSubset2D

extends Object
implements SourceArray2D

Represents a source subset obtained from a source array. Such a 2D array is obtained by taking a subset of the rows and the columns of another source array.

Constructor Summary
`SourceSubset2D(SourceArray2D sourceArray, int fromRow, int fromColumn, int numRows, int numColumns, boolean transposed)` Constructs a new subset from the array `sourceArray`.

Method Summary
`void` | `close()` Clears the data in the source array.
`int` | `columns(int row)` Returns the number of columns in row `row` of the source array.
`
`<T> T`
` | `get(Class<T> pcls, int row, int column)` Returns the element at row `row` and column `column` of the source array, converted to class `pcls`.
`String` | `getElementName()`
`void` | `init()`
`int` | `rows()` Returns the number of rows in the source array.

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

Constructor Detail

### SourceSubset2D

    public SourceSubset2D(SourceArray2D sourceArray,
                          int fromRow,
                          int fromColumn,
                          int numRows,
                          int numColumns,
                          boolean transposed)

  Constructs a new subset from the array `sourceArray`.

  Parameters:
    `sourceArray` - the original source array.
    `fromRow` - the starting row in the original array.
    `fromColumn` - the starting column in the original array.
    `numRows` - the number of rows in the subset.
    `numColumns` - the number of columns in the subset.
    `transposed` - determines if the subset needs to be transposed.
  Throws:
    `IllegalArgumentException` - if one or more arguments are negative or out of bounds.
    `IllegalStateException` - if `sourceArray` is not initialized.

Method Detail

### columns

    public int columns(int row)

  Description copied from interface: `SourceArray2D`
  Returns the number of columns in row `row` of the source array.

  Specified by:
    `columns` in interface `SourceArray2D`
  Parameters:
    `row` - the row to test.
  Returns:
    the number of columns in the row.

### close

    public void close()

  Description copied from interface: `SourceArray2D`
  Clears the data in the source array.

  Specified by:
    `close` in interface `Closeable`
  Specified by:
    `close` in interface `SourceArray2D`

### get

    public <T> T get(Class<T> pcls,
                     int row,
                     int column)

  Description copied from interface: `SourceArray2D`
  Returns the element at row `row` and column `column` of the source array, converted to class `pcls`.

  Specified by:
    `get` in interface `SourceArray2D`
  Type Parameters:
    `T` - the target class.
  Parameters:
    `pcls` - the target class.
    `row` - the row index.
    `column` - the column index.
  Returns:
    the element.

### init

    public void init()

### rows

    public int rows()

  Description copied from interface: `SourceArray2D`
  Returns the number of rows in the source array.

  Specified by:
    `rows` in interface `SourceArray2D`
  Returns:
    the number of rows in the array.

### getElementName

    public String getElementName()

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

To submit a bug or ask questions, send an e-mail to Richard Simard.