Enum Class SinkBuffer

java.lang.Object
java.lang.Enum<SinkBuffer>
org.ek9lang.compiler.support.streams.SinkBuffer
All Implemented Interfaces:
Serializable, Comparable<SinkBuffer>, Constable

public enum SinkBuffer extends Enum<SinkBuffer>
Where the fresh sink of a > that replaces comes from. EMPTY_OF_TARGET_TYPE: a new empty collection of the target's own type (List, Set, Dict). FROM_TARGET: the hidden runtime member _sinkBuffer() of the target, because the fresh sink must carry what the target is CONFIGURED with - a PriorityQueue's comparator and size limit (a plain new queue would lose them in :=:), a JSON's shape (an array or unset target collects into a fresh array, an object target is merged into a COPY of itself, so its meaning is kept and the pipeline is still all-or-nothing; the shape is only known at run time, so the runtime decides, once). EMPTY_OF_TARGET_TYPE is also every other type that can be made with its accessible no-argument constructor and swapped in with its :=:: a scalar, a constrained type, an Optional, a user type with its own |. NO_FRESH_VALUE: it would be replaced but cannot make one (E08278). NONE: not a replaced target (an output channel). Decided by SinkBufferFor.
  • Enum Constant Details

    • NONE

      public static final SinkBuffer NONE
    • EMPTY_OF_TARGET_TYPE

      public static final SinkBuffer EMPTY_OF_TARGET_TYPE
    • FROM_TARGET

      public static final SinkBuffer FROM_TARGET
    • NO_FRESH_VALUE

      public static final SinkBuffer NO_FRESH_VALUE
  • Method Details

    • values

      public static SinkBuffer[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SinkBuffer valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null