org.millscript.office.spreadsheet.worksheets
Class WorksheetImpl

java.lang.Object
  extended by org.millscript.commons.util.list.AbstractIList<Row>
      extended by org.millscript.office.spreadsheet.worksheets.WorksheetImpl
All Implemented Interfaces:
org.millscript.commons.util.IList<Row>, org.millscript.commons.util.IMap<java.lang.Integer,Row>, Worksheet
Direct Known Subclasses:
ExcelWorksheet

public class WorksheetImpl
extends org.millscript.commons.util.list.AbstractIList<Row>
implements Worksheet


Nested Class Summary
 
Nested classes/interfaces inherited from class org.millscript.commons.util.list.AbstractIList
org.millscript.commons.util.list.AbstractIList.ListMapletIterator<V>, org.millscript.commons.util.list.AbstractIList.ListMapletList<V>
 
Constructor Summary
WorksheetImpl()
           
WorksheetImpl(Cell[][] rows)
           
WorksheetImpl(Cell[][] rows, int start, int end)
          Constructs a new worksheet with a copy of the specified backing row array, starting and ending at the specified indices.
 
Method Summary
protected  Row doGet(int pos)
           
protected  org.millscript.commons.util.IList<Row> doSlice(int first, int last, boolean share)
           
 int firstUsedColumn()
           
 int firstUsedRow()
           
 Cell getCell(int row, int col)
           
 Cell getCell0(int row, int col)
           
 Column getColumn(int pos)
           
 Column getColumn(java.lang.Integer pos)
           
 Column getColumn0(int pos)
           
 Column getColumn0(java.lang.Integer pos)
           
 org.millscript.commons.util.IList<Column> getColumnList()
           
 int indexOf(Row value)
           
 void initialiseRow(int rowIndex, int lastCol)
           
 void insertCell(int rowIndex, int colIndex, Cell data)
           
 org.millscript.commons.util.ListIterator<Row> iterator(boolean share)
           
 int lastUsedColumn()
           
 int lastUsedRow()
           
 int numberOfColumns()
           
 int numberOfRows()
           
 int size()
           
 
Methods inherited from class org.millscript.commons.util.list.AbstractIList
allButFirst, allButLast, allFirst, allLast, contains, contains, contains, contains0, contains0, contains0, containsAll, containsKey, containsKey, containsKey0, containsKey0, containsSlice, containsSlice0, containsValue, decorate, equals, first, get, get, get0, get0, getDefault, hashCode, indexOf0, isEmtpy, keyList, last, mapletList, setDefault, setDefault, sharedMapletList, sharedValueList, slice, slice0, toArray, toArray, toString, valueList
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.millscript.commons.util.IList
allButFirst, allButLast, allFirst, allLast, contains, contains, contains0, contains0, contains0, containsKey, containsKey, containsKey0, containsKey0, containsSlice, containsSlice0, first, get, get, get0, get0, getDefault, indexOf0, last, setDefault, slice, slice0, toArray, toArray
 
Methods inherited from interface org.millscript.commons.util.IMap
contains, containsAll, containsValue, equals, hashCode, isEmtpy, keyList, mapletList, setDefault, valueList
 

Constructor Detail

WorksheetImpl

public WorksheetImpl()

WorksheetImpl

public WorksheetImpl(Cell[][] rows)

WorksheetImpl

public WorksheetImpl(Cell[][] rows,
                     int start,
                     int end)
Constructs a new worksheet with a copy of the specified backing row array, starting and ending at the specified indices.

Parameters:
rows - the backing row array to copy
start - the index(one based, inclusive) of the first element in the slice
end - the index(one based, inclusive) of the last element in the slice. If end < start, the new list will be empty
Method Detail

doGet

protected Row doGet(int pos)
Specified by:
doGet in class org.millscript.commons.util.list.AbstractIList<Row>
See Also:
AbstractIList.doGet(int)

doSlice

protected org.millscript.commons.util.IList<Row> doSlice(int first,
                                                         int last,
                                                         boolean share)
Specified by:
doSlice in class org.millscript.commons.util.list.AbstractIList<Row>
See Also:
AbstractIList.doSlice(int, int, boolean)

firstUsedColumn

public int firstUsedColumn()
Specified by:
firstUsedColumn in interface Worksheet
See Also:
Worksheet.firstUsedColumn()

firstUsedRow

public int firstUsedRow()
Specified by:
firstUsedRow in interface Worksheet
See Also:
Worksheet.firstUsedRow()

getCell

public Cell getCell(int row,
                    int col)
Specified by:
getCell in interface Worksheet
See Also:
Worksheet.getCell(int, int)

getCell0

public Cell getCell0(int row,
                     int col)
Specified by:
getCell0 in interface Worksheet
See Also:
Worksheet.getCell0(int, int)

getColumn

public Column getColumn(int pos)
Specified by:
getColumn in interface Worksheet
See Also:
Worksheet.getColumn(int)

getColumn

public Column getColumn(java.lang.Integer pos)
Specified by:
getColumn in interface Worksheet
See Also:
Worksheet.getColumn(java.lang.Integer)

getColumn0

public Column getColumn0(int pos)
Specified by:
getColumn0 in interface Worksheet
See Also:
Worksheet.getColumn0(int)

getColumn0

public Column getColumn0(java.lang.Integer pos)
Specified by:
getColumn0 in interface Worksheet
See Also:
Worksheet.getColumn0(java.lang.Integer)

getColumnList

public org.millscript.commons.util.IList<Column> getColumnList()
Specified by:
getColumnList in interface Worksheet
See Also:
Worksheet.getColumnList()

indexOf

public int indexOf(Row value)
Specified by:
indexOf in interface org.millscript.commons.util.IList<Row>
See Also:
org.millscript.commons.util.IList#indexOf(V)

initialiseRow

public void initialiseRow(int rowIndex,
                          int lastCol)

insertCell

public void insertCell(int rowIndex,
                       int colIndex,
                       Cell data)

iterator

public org.millscript.commons.util.ListIterator<Row> iterator(boolean share)
Specified by:
iterator in interface org.millscript.commons.util.IList<Row>
Specified by:
iterator in interface org.millscript.commons.util.IMap<java.lang.Integer,Row>
See Also:
IList.iterator(boolean)

lastUsedColumn

public int lastUsedColumn()
Specified by:
lastUsedColumn in interface Worksheet
See Also:
Worksheet.lastUsedColumn()

lastUsedRow

public int lastUsedRow()
Specified by:
lastUsedRow in interface Worksheet
See Also:
Worksheet.lastUsedRow()

numberOfColumns

public int numberOfColumns()
Specified by:
numberOfColumns in interface Worksheet
See Also:
Worksheet.numberOfColumns()

numberOfRows

public int numberOfRows()
Specified by:
numberOfRows in interface Worksheet
See Also:
Worksheet.numberOfRows()

size

public int size()
Specified by:
size in interface org.millscript.commons.util.IMap<java.lang.Integer,Row>
See Also:
IMap.size()


Copyright © 2006-2007 Open World Ltd. All Rights Reserved.