com.taursys.model
Class VOListValueHolder

java.lang.Object
  extended bycom.taursys.model.AbstractCollectionValueHolder
      extended bycom.taursys.model.AbstractListValueHolder
          extended bycom.taursys.model.VOListValueHolder
All Implemented Interfaces:
javax.swing.event.ChangeListener, java.util.Collection, CollectionValueHolder, java.util.EventListener, java.util.List, ListValueHolder, ValueHolder

public class VOListValueHolder
extends AbstractListValueHolder
implements ListValueHolder

VOListValueHolder holds a List of value objects and maintains an internal position. You should add or remove objects from the list using methods on this class. You can assign any List to this object.

Version:
1.0
Author:
Marty Phelan

Constructor Summary
VOListValueHolder()
          Constructs a new VOListValueHolder with an empty default size ArrayList.
VOListValueHolder(int size)
          Constructs a new VOListValueHolder with an empty given size ArrayList.
VOListValueHolder(java.util.List list)
          Constructs a new VOListValueHolder with the given List.
 
Method Summary
 java.lang.Object getValueObject()
          Deprecated. - use getObject() instead
 java.lang.Class getValueObjectClass()
          Get the class of the value object.
 void setComparator(java.util.Comparator comparator)
          Set the Comparator that will be used to sort this List.
 void setValueObject(java.lang.Object obj)
          Deprecated. - use setObject instead
 void setValueObjectClass(java.lang.Class clazz)
          Sets the class of the value object.
 
Methods inherited from class com.taursys.model.AbstractListValueHolder
add, add, addAll, addAll, addListSelectionListener, clear, fireValueChanged, fireValueChanged, first, get, getComparator, getList, getPosition, getPropertyValue, getPropertyValues, getRowCount, hasAny, hasNext, hasPrior, indexOf, indexOf, last, lastIndexOf, listIterator, listIterator, moveTo, next, prior, remove, remove, remove, removeAll, removeListSelectionListener, reset, retainAll, set, setCollection, setList, setObject, setPropertyValues, sort, subList, toString
 
Methods inherited from class com.taursys.model.AbstractCollectionValueHolder
addChangeListener, contains, containsAll, getAlias, getCollection, getJavaDataType, getObject, getObjectValueHolder, getParentPropertyName, getParentValueHolder, getPropertyValue, getPropertyValues, isEmpty, iterator, removeChangeListener, setAlias, setParentPropertyName, setParentValueHolder, setPropertyValue, setPropertyValues, size, stateChanged, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.taursys.model.ListValueHolder
addListSelectionListener, first, getPosition, getPropertyValue, getPropertyValues, getRowCount, hasAny, hasPrior, indexOf, last, moveTo, prior, removeListSelectionListener
 
Methods inherited from interface com.taursys.model.CollectionValueHolder
add, addAll, clear, contains, containsAll, equals, getObject, hashCode, hasNext, isEmpty, iterator, next, remove, removeAll, reset, retainAll, setObject, size, toArray, toArray
 
Methods inherited from interface com.taursys.model.ValueHolder
addChangeListener, getAlias, getJavaDataType, getPropertyValue, getPropertyValues, removeChangeListener, setPropertyValue, setPropertyValues
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

VOListValueHolder

public VOListValueHolder()
Constructs a new VOListValueHolder with an empty default size ArrayList.


VOListValueHolder

public VOListValueHolder(int size)
Constructs a new VOListValueHolder with an empty given size ArrayList.


VOListValueHolder

public VOListValueHolder(java.util.List list)
Constructs a new VOListValueHolder with the given List.

Method Detail

setValueObjectClass

public void setValueObjectClass(java.lang.Class clazz)
Sets the class of the value object. Only needed if the obj itself can be null. If set, this takes presidence over the actual class of the obj.


getValueObjectClass

public java.lang.Class getValueObjectClass()
Get the class of the value object. Only needed if the obj itself can be null. If set, this takes presidence over the actual class of the obj.

Returns:
the Class of the value object

getValueObject

public java.lang.Object getValueObject()
Deprecated. - use getObject() instead


setValueObject

public void setValueObject(java.lang.Object obj)
Deprecated. - use setObject instead


setComparator

public void setComparator(java.util.Comparator comparator)
Set the Comparator that will be used to sort this List. The list is sorted whenever you change the list (using setList) or invoke the sort method. If the given comparator is an instance of VOComparator, then it is linked to this VOListValueHolder and the previous VOComparator (if any) is unlinked.

Overrides:
setComparator in class AbstractListValueHolder
Parameters:
comparator - the Comparator used to sort this List.


Copyright © 2007 Martin T Phelan. All Rights Reserved.