thinwire.util
Class ArrayGrid.Row

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<java.lang.Object>
          extended by thinwire.util.ArrayGrid.Row
All Implemented Interfaces:
java.lang.Iterable<java.lang.Object>, java.util.Collection<java.lang.Object>, java.util.List<java.lang.Object>, Grid.Row
Direct Known Subclasses:
GridBox.Row, TableLayout.Row
Enclosing class:
ArrayGrid<R extends ArrayGrid.Row,C extends ArrayGrid.Column>

public static class ArrayGrid.Row
extends java.util.AbstractList<java.lang.Object>
implements Grid.Row

Contains an ArrayList of objects, each object associated with a different column.

See Also:
AbstractList, Grid.Row

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ArrayGrid.Row()
          Construct a Row.
ArrayGrid.Row(java.util.Collection<? extends java.lang.Object> c)
          Construct a Row that contains the values of the specified Collection.
ArrayGrid.Row(java.lang.Object... a)
          Construct a Row that contains the values of the specified Array.
 
Method Summary
 void add(int index, java.lang.Object o)
           
 java.lang.Object get(int index)
           
 java.lang.Object get(java.lang.String columnName)
          Get the field in the specified Column at this Row.
 int getIndex()
          Gets the index for this row.
 Grid getParent()
          Gets the grid that contains this row.
 java.lang.Object remove(int index)
           
 java.lang.Object set(int index, java.lang.Object o)
           
 java.lang.Object set(java.lang.String columnName, java.lang.Object o)
          Set the field in the specified Column at this Row.
 int size()
           
 
Methods inherited from class java.util.AbstractList
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, removeAll, retainAll, subList, toArray, toArray
 

Constructor Detail

ArrayGrid.Row

public ArrayGrid.Row()
Construct a Row.


ArrayGrid.Row

public ArrayGrid.Row(java.util.Collection<? extends java.lang.Object> c)
Construct a Row that contains the values of the specified Collection.

Parameters:
c - the new Row's values.

ArrayGrid.Row

public ArrayGrid.Row(java.lang.Object... a)
Construct a Row that contains the values of the specified Array.

Parameters:
a - the new Row's values.
Method Detail

getParent

public Grid getParent()
Gets the grid that contains this row.

Specified by:
getParent in interface Grid.Row
Returns:
the Grid this Row is part of
See Also:
Grid.Row.getParent()

getIndex

public int getIndex()
Gets the index for this row.

Specified by:
getIndex in interface Grid.Row
Returns:
the index for this Row
See Also:
Grid.Row.getIndex()

get

public java.lang.Object get(java.lang.String columnName)
Description copied from interface: Grid.Row
Get the field in the specified Column at this Row.

Specified by:
get in interface Grid.Row
Parameters:
columnName - the specified Column
Returns:
the field specified by the current row and the column name passed.
See Also:
Grid.Row.get(java.lang.String)

get

public java.lang.Object get(int index)
Specified by:
get in interface java.util.List<java.lang.Object>
Specified by:
get in class java.util.AbstractList<java.lang.Object>
See Also:
List.get(int)

set

public java.lang.Object set(int index,
                            java.lang.Object o)
Specified by:
set in interface java.util.List<java.lang.Object>
Overrides:
set in class java.util.AbstractList<java.lang.Object>
See Also:
List.set(int, java.lang.Object)

set

public java.lang.Object set(java.lang.String columnName,
                            java.lang.Object o)
Description copied from interface: Grid.Row
Set the field in the specified Column at this Row.

Specified by:
set in interface Grid.Row
Parameters:
columnName - the specified Column
o - the new value to set for the cell.
Returns:
the field specified by the current row and the column name passed.

add

public void add(int index,
                java.lang.Object o)
Specified by:
add in interface java.util.List<java.lang.Object>
Overrides:
add in class java.util.AbstractList<java.lang.Object>
See Also:
List.add(int, java.lang.Object)

remove

public java.lang.Object remove(int index)
Specified by:
remove in interface java.util.List<java.lang.Object>
Overrides:
remove in class java.util.AbstractList<java.lang.Object>
See Also:
List.remove(int)

size

public int size()
Specified by:
size in interface java.util.Collection<java.lang.Object>
Specified by:
size in interface java.util.List<java.lang.Object>
Specified by:
size in class java.util.AbstractCollection<java.lang.Object>
See Also:
Collection.size()


ThinWire® is a registered of Custom Credit Systems  Copyright © 2007 All rights reserved.
ThinWire_is_Open_Source_under_the_terms_of_the_LGPLv2.1 SourceForge.net_Project_Page java.net_Member Support_ThinWire,_Digg_our_Story