Class ClassSnapshotParser<T>

  • Type Parameters:
    T - the POJO class to create from snapshots.
    All Implemented Interfaces:
    com.firebase.ui.common.BaseSnapshotParser<com.google.firebase.database.DataSnapshot,​T>, SnapshotParser<T>

    public class ClassSnapshotParser<T>
    extends Object
    implements SnapshotParser<T>
    A convenience implementation of SnapshotParser that converts a DataSnapshot to the parametrized class via DataSnapshot.getValue(Class).
    • Constructor Detail

      • ClassSnapshotParser

        public ClassSnapshotParser​(@NonNull
                                   Class<T> clazz)
    • Method Detail

      • parseSnapshot

        @Nullable
        public T parseSnapshot​(@NonNull
                               com.google.firebase.database.DataSnapshot snapshot)
        Specified by:
        parseSnapshot in interface com.firebase.ui.common.BaseSnapshotParser<com.google.firebase.database.DataSnapshot,​T>