Enum Class SetPacket.Operation

java.lang.Object
java.lang.Enum<SetPacket.Operation>
dev.koifysh.archipelago.network.client.SetPacket.Operation
All Implemented Interfaces:
Serializable, Comparable<SetPacket.Operation>, Constable
Enclosing class:
SetPacket

public static enum SetPacket.Operation extends Enum<SetPacket.Operation>
A List of operations that can be performed on the value stored on the server.
REPLACE, DEFAULT, ADD, MULTIPLY, POWER, MODULO, MAX, MIN, AND, OR, XOR, LEFT_SHIFT, RIGHT_SHIFT, REMOVE, POP, UPDATE
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Adds value to the current value of the key on the server, if both the current value and value are arrays then value will be appended to the current @value.
    Applies a bitwise AND to the current value on the server of the key with @value.
    If the key has no value yet, Sets the current value of the key on the server to the default of the Set's package (@value is ignored).
    Applies a bitwise left-shift to the current value of the key on the server by @value.
    Sets the current value of the key on the server to @value if @value is bigger.
    Sets the current value of the key on the server to @value if @value is lower.
    Sets the current value of the key on the server to the remainder after division by @value.
    Multiplies the current value of the key on the server by @value.
    Applies a bitwise OR to the current value of the key on the server with @value.
    List or Dict: for lists it will remove the index of the @value given.
    Multiplies the current value of the key on the server to the power of @value.
    List only: removes the first instance of @value found in the list.
    Sets the current value of the key on the server to the value given in addDataStorageOperation(Operation, Value).
    Applies a bitwise right-shift to the current value of the key on the server by @value.
    Dict only: Updates the dictionary with the specified elements given in @value creating new keys, or updating old ones if they previously existed.
    Applies a bitwise Exclusive OR to the current value of the key on the server with @value.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • REPLACE

      @SerializedName("replace") public static final SetPacket.Operation REPLACE
      Sets the current value of the key on the server to the value given in addDataStorageOperation(Operation, Value).
    • DEFAULT

      @SerializedName("default") public static final SetPacket.Operation DEFAULT
      If the key has no value yet, Sets the current value of the key on the server to the default of the Set's package (@value is ignored).
    • ADD

      @SerializedName("add") public static final SetPacket.Operation ADD
      Adds value to the current value of the key on the server, if both the current value and value are arrays then value will be appended to the current @value.
    • MULTIPLY

      @SerializedName("mul") public static final SetPacket.Operation MULTIPLY
      Multiplies the current value of the key on the server by @value.
    • POWER

      @SerializedName("pow") public static final SetPacket.Operation POWER
      Multiplies the current value of the key on the server to the power of @value.
    • MODULO

      @SerializedName("mod") public static final SetPacket.Operation MODULO
      Sets the current value of the key on the server to the remainder after division by @value.
    • MAX

      @SerializedName("max") public static final SetPacket.Operation MAX
      Sets the current value of the key on the server to @value if @value is bigger.
    • MIN

      @SerializedName("min") public static final SetPacket.Operation MIN
      Sets the current value of the key on the server to @value if @value is lower.
    • AND

      @SerializedName("and") public static final SetPacket.Operation AND
      Applies a bitwise AND to the current value on the server of the key with @value.
    • OR

      @SerializedName("default") public static final SetPacket.Operation OR
      Applies a bitwise OR to the current value of the key on the server with @value.
    • XOR

      @SerializedName("xor") public static final SetPacket.Operation XOR
      Applies a bitwise Exclusive OR to the current value of the key on the server with @value.
    • LEFT_SHIFT

      @SerializedName("left_shift") public static final SetPacket.Operation LEFT_SHIFT
      Applies a bitwise left-shift to the current value of the key on the server by @value.
    • RIGHT_SHIFT

      @SerializedName("right_shift") public static final SetPacket.Operation RIGHT_SHIFT
      Applies a bitwise right-shift to the current value of the key on the server by @value.
    • REMOVE

      @SerializedName("remove") public static final SetPacket.Operation REMOVE
      List only: removes the first instance of @value found in the list.
    • POP

      @SerializedName("pop") public static final SetPacket.Operation POP
      List or Dict: for lists it will remove the index of the @value given. for dicts it removes the element with the specified key of value.
    • UPDATE

      @SerializedName("update") public static final SetPacket.Operation UPDATE
      Dict only: Updates the dictionary with the specified elements given in @value creating new keys, or updating old ones if they previously existed.
  • Method Details

    • values

      public static SetPacket.Operation[] 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 SetPacket.Operation 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