it.amattioli.dominate.properties
Class IndexedPropertyAdapter<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
it.amattioli.dominate.properties.IndexedPropertyAdapter<T>
- Type Parameters:
T -
- All Implemented Interfaces:
- Iterable<T>, Collection<T>, List<T>
public class IndexedPropertyAdapter<T>
- extends AbstractList<T>
An adapter that allow to access an indexed property of a bean as a regular
List instance.
The property accessor methods must follow the following naming pattern:
- reading method: getPropertyName(int index)
- add row method: addPropertyName(PropertyClass toBeAdded)
- delete row method: removePropertyName(PropertyClass toBeRemoved)
- Author:
- andrea
| Methods inherited from class java.util.AbstractList |
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, set, subList |
IndexedPropertyAdapter
public IndexedPropertyAdapter(Object bean,
String propertyName)
get
public T get(int index)
- Specified by:
get in interface List<T>- Specified by:
get in class AbstractList<T>
getEditingList
public List<T> getEditingList()
size
public int size()
- Specified by:
size in interface Collection<T>- Specified by:
size in interface List<T>- Specified by:
size in class AbstractCollection<T>
add
public void add(int index,
T element)
- Specified by:
add in interface List<T>- Overrides:
add in class AbstractList<T>
remove
public T remove(int index)
- Specified by:
remove in interface List<T>- Overrides:
remove in class AbstractList<T>
Copyright © 2011. All Rights Reserved.