-
- All Implemented Interfaces:
-
com.google.firebase.database.ChildEventListener,com.google.firebase.database.ValueEventListener,java.lang.Iterable,java.util.Collection,java.util.List,java.util.SequencedCollection
public class FirebaseArray<T> extends ObservableSnapshotArray<T> implements ChildEventListener, ValueEventListener
This class implements a collection on top of a Firebase location.
-
-
Constructor Summary
Constructors Constructor Description FirebaseArray(Query query, SnapshotParser<T> parser)Create a new FirebaseArray with a custom SnapshotParser.
-
Method Summary
Modifier and Type Method Description voidonChildAdded(@NonNull() DataSnapshot snapshot, @Nullable() String previousChildKey)voidonChildChanged(@NonNull() DataSnapshot snapshot, @Nullable() String previousChildKey)voidonChildRemoved(@NonNull() DataSnapshot snapshot)voidonChildMoved(@NonNull() DataSnapshot snapshot, @Nullable() String previousChildKey)voidonDataChange(@NonNull() DataSnapshot snapshot)voidonCancelled(@NonNull() DatabaseError error)-
Methods inherited from class com.firebase.ui.common.BaseObservableSnapshotArray
addChangeEventListener, clear, get, getSnapshot, isListening, removeAllListeners, removeChangeEventListener, size -
Methods inherited from class java.util.AbstractList
add, add, addAll, equals, get, hashCode, indexOf, iterator, lastIndexOf, listIterator, remove, set, subList -
Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString -
Methods inherited from class java.util.Collection
parallelStream, removeIf, spliterator, stream -
Methods inherited from class java.lang.Iterable
forEach, iterator, spliterator -
Methods inherited from class java.util.List
addFirst, addLast, copyOf, getFirst, getLast, of, removeFirst, removeLast, replaceAll, reversed, sort -
Methods inherited from class java.util.SequencedCollection
reversed -
Methods inherited from class com.google.firebase.database.ChildEventListener
onCancelled, onChildAdded, onChildChanged, onChildMoved, onChildRemoved -
Methods inherited from class com.google.firebase.database.ValueEventListener
onDataChange -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
FirebaseArray
FirebaseArray(Query query, SnapshotParser<T> parser)
Create a new FirebaseArray with a custom SnapshotParser.- Parameters:
query- The Firebase location to watch for data changes.
-
-
Method Detail
-
onChildAdded
void onChildAdded(@NonNull() DataSnapshot snapshot, @Nullable() String previousChildKey)
-
onChildChanged
void onChildChanged(@NonNull() DataSnapshot snapshot, @Nullable() String previousChildKey)
-
onChildRemoved
void onChildRemoved(@NonNull() DataSnapshot snapshot)
-
onChildMoved
void onChildMoved(@NonNull() DataSnapshot snapshot, @Nullable() String previousChildKey)
-
onDataChange
void onDataChange(@NonNull() DataSnapshot snapshot)
-
onCancelled
void onCancelled(@NonNull() DatabaseError error)
-
-
-
-