Class IntValue

java.lang.Object
org.apache.juneau.internal.IntValue

public final class IntValue extends Object
A simple settable integer value.
  • Method Details

    • create

      public static IntValue create()
      Creates a new integer value initialized to 0.
      Returns:
      A new integer value.
    • of

      public static IntValue of(int value)
      Creates an integer value with the specified initial state.
      Parameters:
      value - The initial state of the value.
      Returns:
      A new integer value.
    • set

      public IntValue set(int value)
      Sets the value.
      Parameters:
      value - The new value.
      Returns:
      This object.
    • get

      public int get()
      Returns the value.
      Returns:
      The value.
    • getAndIncrement

      public int getAndIncrement()
      Returns the current value and then increments it.
      Returns:
      The current value.