public class DynamicRealmList extends java.util.AbstractList<DynamicRealmObject>
RealmList exposed using a dynamic API. All objects in the list must have the same schema even though
they are accessed dynamically. Null values are not allowed in this list.| Modifier and Type | Method and Description |
|---|---|
boolean |
add(DynamicRealmObject object)
Adds the specified object at the end of this List.
|
void |
clear()
Removes all elements from this list, leaving it empty.
|
DynamicRealmObject |
get(int location)
Returns the element at the specified location in this list.
|
DynamicRealmObject |
remove(int location)
Removes the object at the specified location from this list.
|
DynamicRealmObject |
set(int location,
DynamicRealmObject object)
Replaces the element at the specified location in this list with the
specified object.
|
int |
size()
Returns the number of elements in this list.
|
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringpublic boolean add(DynamicRealmObject object)
add in interface java.util.Collection<DynamicRealmObject>add in interface java.util.List<DynamicRealmObject>add in class java.util.AbstractList<DynamicRealmObject>object - the object to add.java.lang.IllegalArgumentException - if object is either null or has the wrong type.public void clear()
clear in interface java.util.Collection<DynamicRealmObject>clear in interface java.util.List<DynamicRealmObject>clear in class java.util.AbstractList<DynamicRealmObject>List.isEmpty(),
List.size()public DynamicRealmObject get(int location)
get in interface java.util.List<DynamicRealmObject>get in class java.util.AbstractList<DynamicRealmObject>location - the index of the element to return.java.lang.IndexOutOfBoundsException - if location < 0 || location >= size()public DynamicRealmObject remove(int location)
remove in interface java.util.List<DynamicRealmObject>remove in class java.util.AbstractList<DynamicRealmObject>location - the index of the object to remove.java.lang.IndexOutOfBoundsException - if location < 0 || location >= size()public DynamicRealmObject set(int location, DynamicRealmObject object)
set in interface java.util.List<DynamicRealmObject>set in class java.util.AbstractList<DynamicRealmObject>location - the index at which to put the specified object.object - the object to add.java.lang.IllegalArgumentException - if object is either null or has the wrong type.java.lang.IndexOutOfBoundsException - if location < 0 || location >= size()public int size()
size in interface java.util.Collection<DynamicRealmObject>size in interface java.util.List<DynamicRealmObject>size in class java.util.AbstractCollection<DynamicRealmObject>