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 Details

    • toMutable

      @NonNull public abstract AbstractJFleeceCollection<T> toMutable()
    • count

      public int count()
      Specified by:
      count in interface JFleeceCollectionInterface
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface JFleeceCollectionInterface
    • encodeTo

      public void encodeTo(@NonNull com.couchbase.lite.internal.fleece.FLEncoder enc)
      Specified by:
      encodeTo in interface com.couchbase.lite.internal.fleece.FleeceEncodable
    • toJSON

      @NonNull public String toJSON() throws CouchbaseLiteException
      Encode an Array as a JSON string
      Specified by:
      toJSON in interface com.couchbase.lite.internal.fleece.JSONEncodable
      Returns:
      JSON encoded representation of the Array
      Throws:
      CouchbaseLiteException - on encoder failure.