public class RecordList extends java.util.ArrayList<Record> implements HasDataChangedHandlers
| Modifier and Type | Field and Description |
|---|---|
protected int |
_dataChangeFlag |
| Constructor and Description |
|---|
RecordList() |
RecordList(java.util.Collection<? extends Record> records) |
RecordList(Record... records)
Construct a new RecordList containing the supplied records
|
RecordList(Record[] records,
int start,
int end)
Construct a new RecordList containing the specified subset of the supplied records.
|
RecordList(RecordList recordList)
Construct a new RecordList containing the same records as the supplied RecordList; the
new RecordList is effectively a copy of the supplied RecordList
|
RecordList(RecordList recordList,
int start,
int end)
Construct a new RecordList containing the specified subset of the Records contained in
the supplied RecordList.
|
| Modifier and Type | Method and Description |
|---|---|
protected com.google.gwt.event.shared.HandlerManager |
_createHandlerManager() |
void |
_doneChangingData() |
protected com.google.gwt.event.shared.HandlerManager |
_ensureHandlers() |
java.util.Comparator<java.lang.Object> |
_getDefaultComparator() |
void |
_maybeFireDataChangedEvent() |
RecordList |
_sortByProperties(SortSpecifier[] specifiers) |
RecordList |
_sortByProperties(SortSpecifier[] specifiers,
java.util.Comparator<java.lang.Object> comparator) |
RecordList |
_sortByProperty(java.lang.String property,
boolean up,
java.util.Comparator<java.lang.Object> comparator)
Sort the RecordList in-place, according to the value of the supplied property on each
Record, using the supplied comparator
|
void |
_startChangingData() |
void |
add(int index,
Record record) |
boolean |
add(Record record) |
boolean |
addAll(java.util.Collection<? extends Record> c) |
boolean |
addAll(int index,
java.util.Collection<? extends Record> c) |
com.google.gwt.event.shared.HandlerRegistration |
addDataChangedHandler(DataChangedHandler handler) |
void |
clear() |
Record |
find(java.util.Map<java.lang.String,?> properties)
Find the first Record in the list where the values of all the properties in the parameter
Map match the corresponding property in the Record
|
Record |
find(java.util.Map<java.lang.String,?> properties,
int start)
Like find(), but inspects a range from startIndex to the end of the list
|
Record |
find(java.util.Map<java.lang.String,?> properties,
int start,
int end)
Like find(), but inspects a range from startIndex to endIndex
|
Record |
find(java.lang.String property,
java.lang.Object value)
Find the first Record in the list where the value of the parameter property matches the
parameter value
|
Record |
find(java.lang.String property,
java.lang.Object value,
int start)
Find the first Record where the value of the parameter property matches the
parameter value a range from startIndex to the end of the list
|
protected Record |
find(java.lang.String property,
java.lang.Object value,
int start,
int end)
Find the first Record where the value of the parameter property matches the
parameter value a range from startIndex to endIndex
|
protected int |
findIndex(java.util.Map<java.lang.String,?> properties)
Find the index of the first Record in the list where the values of all the properties in
the parameter Map match the corresponding property in the Record
|
protected int |
findIndex(java.util.Map<java.lang.String,?> properties,
int start)
Find the index of the first Record where the values of all the properties in
the parameter Map match the corresponding property in the Record in a range
from startIndex to the end of the list.
|
int |
findIndex(java.util.Map<java.lang.String,?> properties,
int start,
int end)
Find the index of the first Record where the values of all the properties in
the parameter Map match the corresponding property in the Record in a range
from startIndex to endIndex.
|
protected int |
findIndex(java.lang.String property,
java.lang.Object value)
Finds index of first Record in the list where the value of the parameter property matches the
parameter value.
|
protected int |
findIndex(java.lang.String property,
java.lang.Object value,
int start)
Finds index of first Record where the value of the parameter property matches the
parameter value in a range from startIndex to the end of the list.
|
protected int |
findIndex(java.lang.String property,
java.lang.Object value,
int start,
int end)
Finds index of first Record where the value of the parameter property matches the
parameter value in a range from startIndex to endIndex.
|
void |
fireEvent(com.google.gwt.event.shared.GwtEvent<?> event) |
Record[] |
getRange(int start,
int end)
Returns a Record array made up of the Records in this list inside the range denoted by
the start and end parameters (non-inclusive at the end).
|
Record |
remove(int index) |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
void |
removeRange(int start,
int end) |
boolean |
retainAll(java.util.Collection<?> c) |
Record |
set(int index,
Record record) |
RecordList |
sortByProperty(java.lang.String property,
boolean up)
Sort the RecordList in-place, according to the value of the supplied property on each
Record, using the default comparator
|
RecordList |
subList(int start,
int end)
Returns a RecordList made up of the Records in this list inside the range denoted by
the start and end parameters (non-inclusive at the end).
|
void |
swap(int index1,
int index2)
Swap the positions of two Records in the list
|
clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeIf, replaceAll, size, sort, spliterator, toArray, toArray, trimToSizepublic RecordList()
public RecordList(java.util.Collection<? extends Record> records)
public RecordList(Record... records)
records - public RecordList(Record[] records, int start, int end)
records - start - end - public RecordList(RecordList recordList)
recordList - public RecordList(RecordList recordList, int start, int end)
recordList - start - end - @SGWTInternal public final void _startChangingData()
@SGWTInternal public final void _maybeFireDataChangedEvent()
@SGWTInternal public final void _doneChangingData()
public Record[] getRange(int start, int end)
start - First Record to include in the subsetend - Include every Record up to (but not including) this onepublic RecordList subList(int start, int end)
protected int findIndex(java.lang.String property,
java.lang.Object value)
property - The name of the property to find byvalue - The property value to matchprotected int findIndex(java.lang.String property,
java.lang.Object value,
int start)
property - The name of the property to find byvalue - The property value to matchstart - The index of the first Record to include in the searchprotected int findIndex(java.lang.String property,
java.lang.Object value,
int start,
int end)
property - The name of the property to find byvalue - The property value to matchstart - The index of the first Record to include in the searchend - The index of the end of the range (non-inclusive)protected int findIndex(java.util.Map<java.lang.String,?> properties)
properties - A Map of property/value pairs to matchprotected int findIndex(java.util.Map<java.lang.String,?> properties,
int start)
properties - A Map of property/value pairs to matchstart - The index of the first Record to include in the searchpublic int findIndex(java.util.Map<java.lang.String,?> properties,
int start,
int end)
properties - A Map of property/value pairs to matchstart - The index of the first Record to include in the searchend - The index of the end of the range (non-inclusive)public Record find(java.lang.String property, java.lang.Object value)
property - The name of the property to find byvalue - The property value to matchpublic Record find(java.lang.String property, java.lang.Object value, int start)
property - The name of the property to find byvalue - The property value to matchstart - The index of the first Record to include in the searchprotected Record find(java.lang.String property, java.lang.Object value, int start, int end)
property - The name of the property to find byvalue - The property value to matchstart - The index of the first Record to include in the searchend - The index of the end of the range (non-inclusive)public Record find(java.util.Map<java.lang.String,?> properties)
properties - A Map of property/value pairs to matchpublic Record find(java.util.Map<java.lang.String,?> properties, int start)
properties - A Map of property/value pairs to matchstart - The index of the first Record to include in the searchpublic Record find(java.util.Map<java.lang.String,?> properties, int start, int end)
properties - A Map of property/value pairs to matchstart - The index of the first Record to include in the searchend - The index of the end of the range (non-inclusive)public RecordList sortByProperty(java.lang.String property, boolean up)
property - The name of the property to sort byup - If true, sort in ascending order; otherwise in descending order@SGWTInternal public RecordList _sortByProperty(java.lang.String property, boolean up, java.util.Comparator<java.lang.Object> comparator)
property - The name of the property to sort byup - If true, sort in ascending order; otherwise in descending ordercomparator - A Comparator that is able to provide meaningful comparisons between
two values of the property being sorted by@SGWTInternal public RecordList _sortByProperties(SortSpecifier[] specifiers)
@SGWTInternal public RecordList _sortByProperties(SortSpecifier[] specifiers, java.util.Comparator<java.lang.Object> comparator)
@SGWTInternal public java.util.Comparator<java.lang.Object> _getDefaultComparator()
public void swap(int index1,
int index2)
index1 - index2 - public boolean add(Record record)
public void add(int index,
Record record)
public boolean addAll(java.util.Collection<? extends Record> c)
public boolean addAll(int index,
java.util.Collection<? extends Record> c)
public Record remove(int index)
public boolean remove(java.lang.Object o)
public void removeRange(int start,
int end)
removeRange in class java.util.ArrayList<Record>public boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public void clear()
@SGWTInternal protected com.google.gwt.event.shared.HandlerManager _createHandlerManager()
@SGWTInternal protected final com.google.gwt.event.shared.HandlerManager _ensureHandlers()
public com.google.gwt.event.shared.HandlerRegistration addDataChangedHandler(DataChangedHandler handler)
addDataChangedHandler in interface HasDataChangedHandlerspublic final void fireEvent(com.google.gwt.event.shared.GwtEvent<?> event)
fireEvent in interface com.google.gwt.event.shared.HasHandlers