Class ImmutableContainer

java.lang.Object
io.deephaven.engine.rowset.impl.rsp.container.Container
io.deephaven.engine.rowset.impl.rsp.container.ImmutableContainer
Direct Known Subclasses:
EmptyContainer, SingleRangeContainer, SingletonContainer, TwoValuesContainer

public abstract class ImmutableContainer extends Container
  • Field Details

    • ENABLED

      public static final boolean ENABLED
  • Constructor Details

    • ImmutableContainer

      public ImmutableContainer()
  • Method Details

    • deepCopy

      public final Container deepCopy()
      Description copied from class: Container
      Get a full deep copy of the container in a new container object.
      Specified by:
      deepCopy in class Container
      Returns:
      A copy of the container as a new object.
    • cowRef

      public final Container cowRef()
      Description copied from class: Container
      Get a shared, copy-on-write copy of an existing container. Mutations on the returned container will always return a copy and leave the original container unchanged.

      This operation allows for cheap read-only references to the same values, at the cost of an additional copy for any first mutation.

      Specified by:
      cowRef in class Container
      Returns:
      A copy-on-write reference to the container.
    • iset

      public final Container iset(short x)
      Description copied from class: Container
      Insert a short to the container. May generate a new container.
      Specified by:
      iset in class Container
      Parameters:
      x - short to be added
      Returns:
      the resulting container
    • iunset

      public final Container iunset(short x)
      Description copied from class: Container
      Create a new container with the short removed.
      Specified by:
      iunset in class Container
      Parameters:
      x - to be removed
      Returns:
      New container without x.
    • iadd

      public final Container iadd(int begin, int end)
      Description copied from class: Container
      Add all shorts in [begin,end) using an unsigned interpretation. May generate a new container.
      Specified by:
      iadd in class Container
      Parameters:
      begin - start of range (inclusive)
      end - end of range (exclusive)
      Returns:
      the new container
    • iappend

      public final Container iappend(int begin, int end)
      Description copied from class: Container
      Add all shorts in [begin,end) using an unsigned interpretation. May generate a new container. The beginning of the range should be strictly greater than the last value already present in the container, if there is one.
      Specified by:
      iappend in class Container
      Parameters:
      begin - start of range (inclusive)
      end - end of range (exclusive)
      Returns:
      the new container
    • iand

      public final Container iand(ArrayContainer x)
      Description copied from class: Container
      Computes the in-place bitwise AND of this container with another (intersection). The current container is generally modified, whereas the provided container (x) is unaffected. May generate a new container.
      Specified by:
      iand in class Container
      Parameters:
      x - Another container
      Returns:
      aggregated container
    • iand

      public final Container iand(BitmapContainer x)
      Description copied from class: Container
      Computes the in-place bitwise AND of this container with another (intersection). The current container is generally modified, whereas the provided container (x) is unaffected. May generate a new container.
      Specified by:
      iand in class Container
      Parameters:
      x - Another container
      Returns:
      aggregated container
    • iand

      public final Container iand(RunContainer x)
      Description copied from class: Container
      Computes the in-place bitwise AND of this container with another (intersection). The current container is generally modified, whereas the provided container (x) is unaffected. May generate a new container.
      Specified by:
      iand in class Container
      Parameters:
      x - Another container
      Returns:
      aggregated container
    • iandNot

      public final Container iandNot(ArrayContainer x)
      Description copied from class: Container
      Computes the in-place bitwise ANDNOT of this container with another (difference). The current container is generally modified, whereas the provided container (x) is unaffected. May generate a new container.
      Specified by:
      iandNot in class Container
      Parameters:
      x - Another container
      Returns:
      aggregated container
    • iandNot

      public final Container iandNot(BitmapContainer x)
      Description copied from class: Container
      Computes the in-place bitwise ANDNOT of this container with another (difference). The current container is generally modified, whereas the provided container (x) is unaffected. May generate a new container.
      Specified by:
      iandNot in class Container
      Parameters:
      x - Another container
      Returns:
      aggregated container
    • iandNot

      public final Container iandNot(RunContainer x)
      Description copied from class: Container
      Computes the in-place bitwise ANDNOT of this container with another (difference). The current container is generally modified, whereas the provided container (x) is unaffected. May generate a new container.
      Specified by:
      iandNot in class Container
      Parameters:
      x - Another container
      Returns:
      aggregated container
    • inot

      public final Container inot(int rangeStart, int rangeEnd)
      Description copied from class: Container
      Computes the in-place bitwise NOT of this container (complement). Only those bits within the range are affected. The current container is generally modified. May generate a new container.
      Specified by:
      inot in class Container
      Parameters:
      rangeStart - beginning of range (inclusive); 0 is beginning of this container.
      rangeEnd - ending of range (exclusive)
      Returns:
      (partially) complemented container
    • ior

      public final Container ior(ArrayContainer x)
      Description copied from class: Container
      Computes the in-place bitwise OR of this container with another (union). The current container is generally modified, whereas the provided container (x) is unaffected. May generate a new container.
      Specified by:
      ior in class Container
      Parameters:
      x - Another container
      Returns:
      aggregated container
    • ior

      public final Container ior(BitmapContainer x)
      Description copied from class: Container
      Computes the in-place bitwise OR of this container with another (union). The current container is generally modified, whereas the provided container (x) is unaffected. May generate a new container.
      Specified by:
      ior in class Container
      Parameters:
      x - Another container
      Returns:
      aggregated container
    • ior

      public final Container ior(RunContainer x)
      Description copied from class: Container
      Computes the in-place bitwise OR of this container with another (union). The current container is generally modified, whereas the provided container (x) is unaffected. May generate a new container.
      Specified by:
      ior in class Container
      Parameters:
      x - Another container
      Returns:
      aggregated container
    • iremove

      public final Container iremove(int begin, int end)
      Description copied from class: Container
      Remove shorts in [begin,end) using an unsigned interpretation. May generate a new container.
      Specified by:
      iremove in class Container
      Parameters:
      begin - start of range (inclusive)
      end - end of range (exclusive)
      Returns:
      the new container
    • ixor

      public final Container ixor(ArrayContainer x)
      Description copied from class: Container
      Computes the in-place bitwise XOR of this container with another (symmetric difference). The current container is generally modified, whereas the provided container (x) is unaffected. May generate a new container.
      Specified by:
      ixor in class Container
      Parameters:
      x - Another container
      Returns:
      aggregated container
    • ixor

      public final Container ixor(BitmapContainer x)
      Description copied from class: Container
      Computes the in-place bitwise XOR of this container with another (symmetric difference). The current container is generally modified, whereas the provided container (x) is unaffected. May generate a new container.
      Specified by:
      ixor in class Container
      Parameters:
      x - Another container
      Returns:
      aggregated container
    • ixor

      public final Container ixor(RunContainer x)
      Description copied from class: Container
      Computes the in-place bitwise XOR of this container with another (symmetric difference). The current container is generally modified, whereas the provided container (x) is unaffected. May generate a new container.
      Specified by:
      ixor in class Container
      Parameters:
      x - Another container
      Returns:
      aggregated container
    • iandRange

      public final Container iandRange(int start, int end)
      Description copied from class: Container
      Calculate the intersection of this container and a range; may overwrite the existing container or return a new one.
      Specified by:
      iandRange in class Container
      Parameters:
      start - start of range
      end - end of range, exclusive.
      Returns:
      a Container containing the intersction of this container and the given range.
    • isShared

      public final boolean isShared()
      Specified by:
      isShared in class Container