Package com.couchbase.lite
Class AbstractJFleeceCollection<T extends com.couchbase.lite.internal.fleece.MCollection>
java.lang.Object
com.couchbase.lite.internal.BaseJFleeceCollection
com.couchbase.lite.AbstractJFleeceCollection<T>
- Type Parameters:
T- the type of the backing collection
- All Implemented Interfaces:
com.couchbase.lite.internal.fleece.FleeceEncodable,com.couchbase.lite.internal.fleece.JSONEncodable,JFleeceCollectionInterface
- Direct Known Subclasses:
Array,Dictionary
@Internal("This class in not part of the public API")
public abstract class AbstractJFleeceCollection<T extends com.couchbase.lite.internal.fleece.MCollection>
extends com.couchbase.lite.internal.BaseJFleeceCollection
implements JFleeceCollectionInterface, com.couchbase.lite.internal.fleece.JSONEncodable, com.couchbase.lite.internal.fleece.FleeceEncodable
AbstractJFleeceCollection is the implementation of JFleeceCollectionInterface common to Array and Dictionary.
-
Method Summary
-
Method Details
-
toMutable
-
count
public int count()- Specified by:
countin interfaceJFleeceCollectionInterface
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceJFleeceCollectionInterface
-
encodeTo
public void encodeTo(@NonNull com.couchbase.lite.internal.fleece.FLEncoder enc) - Specified by:
encodeToin interfacecom.couchbase.lite.internal.fleece.FleeceEncodable
-
toJSON
Encode an Array as a JSON string- Specified by:
toJSONin interfacecom.couchbase.lite.internal.fleece.JSONEncodable- Returns:
- JSON encoded representation of the Array
- Throws:
CouchbaseLiteException- on encoder failure.
-