Class ContentJSON

    • Constructor Detail

      • ContentJSON

        public ContentJSON​(java.util.List<java.lang.Object> arr)
    • Method Detail

      • getArr

        public java.util.List<java.lang.Object> getArr()
      • setArr

        public void setArr​(java.util.List<java.lang.Object> arr)
      • getContent

        public java.util.List<java.lang.Object> getContent()
        Overrides:
        getContent in class AbstractContent
        Returns:
        the content as an array
      • isCountable

        public boolean isCountable()
        Description copied from class: AbstractContent
        Should return false if this Item is some kind of meta information (e.g. format information). * Whether this Item should be addressable via `yarray.get(i)` * Whether this Item should be counted when computing yarray.length
        Overrides:
        isCountable in class AbstractContent
        Returns:
        true if the content is countable, false otherwise
      • splice

        public ContentJSON splice​(int offset)
        Description copied from class: AbstractContent
        Splices the content at the specified offset.
        Overrides:
        splice in class AbstractContent
        Parameters:
        offset - the offset at which to splice the content
        Returns:
        a new instance of AbstractContent representing the spliced content
      • mergeWith

        public boolean mergeWith​(AbstractContent right)
        Description copied from class: AbstractContent
        Merges this content with another content.
        Overrides:
        mergeWith in class AbstractContent
        Parameters:
        right - the content to merge with
        Returns:
        true if the merge was successful, false otherwise
      • integrate

        public void integrate​(Transaction transaction,
                              Item item)
        Description copied from class: AbstractContent
        Integrates this content into a transaction.
        Overrides:
        integrate in class AbstractContent
        Parameters:
        transaction - the transaction to integrate into
        item - the item associated with this content
      • delete

        public void delete​(Transaction transaction)
        Description copied from class: AbstractContent
        Deletes this content from a transaction.
        Overrides:
        delete in class AbstractContent
        Parameters:
        transaction - the transaction to delete from
      • gc

        public void gc​(StructStore store)
        Description copied from class: AbstractContent
        Performs garbage collection on this content.
        Overrides:
        gc in class AbstractContent
        Parameters:
        store - the store in which to perform garbage collection
      • write

        public void write​(UpdateEncoder encoder,
                          int offset)
        Description copied from class: AbstractContent
        Writes this content to an encoder.
        Overrides:
        write in class AbstractContent
        Parameters:
        encoder - the encoder to write to
        offset - the offset at which to write
      • getRef

        public int getRef()
        Overrides:
        getRef in class AbstractContent
        Returns:
        a reference ID for this content