Class ListValue<E extends CelValue>

  • All Implemented Interfaces:
    java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>
    Direct Known Subclasses:
    ImmutableListValue

    @Immutable
    public abstract class ListValue<E extends CelValue>
    extends CelValue
    implements java.util.List<E>
    ListValue is an abstract representation of a generic list containing zero or more CelValue.

    All methods that can mutate the list are disallowed.

    • Constructor Summary

      Constructors 
      Constructor Description
      ListValue()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void add​(int index, E element)
      Deprecated.
      Unsupported operation.
      boolean add​(E e)
      Deprecated.
      Unsupported operation.
      boolean addAll​(int index, java.util.Collection<? extends E> newElements)
      Deprecated.
      Unsupported operation.
      boolean addAll​(java.util.Collection<? extends E> c)
      Deprecated.
      Unsupported operation.
      CelType celType()
      The CelType that represents this value.
      void clear()
      Deprecated.
      Unsupported operation.
      boolean isZeroValue()
      Returns true if the CelValue.value() is a zero value for its type.
      E remove​(int index)
      Deprecated.
      Unsupported operation.
      boolean remove​(java.lang.Object o)
      Deprecated.
      Unsupported operation.
      boolean removeAll​(java.util.Collection<?> c)
      Deprecated.
      Unsupported operation.
      void replaceAll​(java.util.function.UnaryOperator<E> operator)
      Deprecated.
      Unsupported operation.
      boolean retainAll​(java.util.Collection<?> c)
      Deprecated.
      Unsupported operation.
      E set​(int index, E element)
      Deprecated.
      Unsupported operation.
      void sort​(@Nullable java.util.Comparator<? super E> c)
      Deprecated.
      Unsupported operation.
      abstract java.util.List<E> value()
      The underlying value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, size, spliterator, subList, toArray, toArray
    • Constructor Detail

      • ListValue

        public ListValue()
    • Method Detail

      • value

        public abstract java.util.List<E> value()
        Description copied from class: CelValue
        The underlying value. This is typically the Java native value or a derived instance of CelValue (ex: an element in lists or key/value pair in maps).
        Specified by:
        value in class CelValue
      • celType

        public CelType celType()
        Description copied from class: CelValue
        The CelType that represents this value.
        Specified by:
        celType in class CelValue
      • clear

        @Deprecated
        public final void clear()
        Deprecated.
        Unsupported operation.
        Guaranteed to throw an exception and leave the list unmodified.
        Specified by:
        clear in interface java.util.Collection<E extends CelValue>
        Specified by:
        clear in interface java.util.List<E extends CelValue>
        Throws:
        java.lang.UnsupportedOperationException - always
      • retainAll

        @Deprecated
        public final boolean retainAll​(java.util.Collection<?> c)
        Deprecated.
        Unsupported operation.
        Guaranteed to throw an exception and leave the list unmodified.
        Specified by:
        retainAll in interface java.util.Collection<E extends CelValue>
        Specified by:
        retainAll in interface java.util.List<E extends CelValue>
        Throws:
        java.lang.UnsupportedOperationException - always
      • set

        @CanIgnoreReturnValue
        @Deprecated
        public final E set​(int index,
                           E element)
        Deprecated.
        Unsupported operation.
        Guaranteed to throw an exception and leave the list unmodified.
        Specified by:
        set in interface java.util.List<E extends CelValue>
        Throws:
        java.lang.UnsupportedOperationException - always
      • replaceAll

        @Deprecated
        public final void replaceAll​(java.util.function.UnaryOperator<E> operator)
        Deprecated.
        Unsupported operation.
        Guaranteed to throw an exception and leave the list unmodified.
        Specified by:
        replaceAll in interface java.util.List<E extends CelValue>
        Throws:
        java.lang.UnsupportedOperationException - always
      • sort

        @Deprecated
        public final void sort​(@Nullable java.util.Comparator<? super E> c)
        Deprecated.
        Unsupported operation.
        Guaranteed to throw an exception and leave the list unmodified.
        Specified by:
        sort in interface java.util.List<E extends CelValue>
        Throws:
        java.lang.UnsupportedOperationException - always
      • add

        @Deprecated
        public final void add​(int index,
                              E element)
        Deprecated.
        Unsupported operation.
        Guaranteed to throw an exception and leave the list unmodified.
        Specified by:
        add in interface java.util.List<E extends CelValue>
        Throws:
        java.lang.UnsupportedOperationException - always
      • add

        @Deprecated
        public final boolean add​(E e)
        Deprecated.
        Unsupported operation.
        Guaranteed to throw an exception and leave the list unmodified.
        Specified by:
        add in interface java.util.Collection<E extends CelValue>
        Specified by:
        add in interface java.util.List<E extends CelValue>
        Throws:
        java.lang.UnsupportedOperationException - always
      • addAll

        @CanIgnoreReturnValue
        @Deprecated
        public final boolean addAll​(int index,
                                    java.util.Collection<? extends E> newElements)
        Deprecated.
        Unsupported operation.
        Guaranteed to throw an exception and leave the list unmodified.
        Specified by:
        addAll in interface java.util.List<E extends CelValue>
        Throws:
        java.lang.UnsupportedOperationException - always
      • addAll

        @Deprecated
        public final boolean addAll​(java.util.Collection<? extends E> c)
        Deprecated.
        Unsupported operation.
        Guaranteed to throw an exception and leave the list unmodified.
        Specified by:
        addAll in interface java.util.Collection<E extends CelValue>
        Specified by:
        addAll in interface java.util.List<E extends CelValue>
        Throws:
        java.lang.UnsupportedOperationException - always
      • remove

        @CanIgnoreReturnValue
        @Deprecated
        public final E remove​(int index)
        Deprecated.
        Unsupported operation.
        Guaranteed to throw an exception and leave the list unmodified.
        Specified by:
        remove in interface java.util.List<E extends CelValue>
        Throws:
        java.lang.UnsupportedOperationException - always
      • remove

        @Deprecated
        public final boolean remove​(java.lang.Object o)
        Deprecated.
        Unsupported operation.
        Guaranteed to throw an exception and leave the list unmodified.
        Specified by:
        remove in interface java.util.Collection<E extends CelValue>
        Specified by:
        remove in interface java.util.List<E extends CelValue>
        Throws:
        java.lang.UnsupportedOperationException - always
      • removeAll

        @Deprecated
        public final boolean removeAll​(java.util.Collection<?> c)
        Deprecated.
        Unsupported operation.
        Guaranteed to throw an exception and leave the list unmodified.
        Specified by:
        removeAll in interface java.util.Collection<E extends CelValue>
        Specified by:
        removeAll in interface java.util.List<E extends CelValue>
        Throws:
        java.lang.UnsupportedOperationException - always