Class SharedInteger

java.lang.Object
cl.netswitch.lib.server.SharedValue
cl.netswitch.lib.server.SharedInteger

public final class SharedInteger extends SharedValue
Contains an Integer value that is shared by all servers.
  • Method Details

    • get

      public int get()
      Returns the value of this SharedInteger.
      Returns:
      the value of this SharedInteger.
    • set

      public void set(int value)
      Changes the value of this SharedInteger.
      Parameters:
      value - the new value of this SharedInteger.
    • parse

      public void parse(String text)
      Changes the value of this SharedInteger.
      Specified by:
      parse in class SharedValue
      Parameters:
      text - the string representation of the new value.
      Throws:
      IllegalArgumentException - if text is invalid.
    • toString

      public String toString()
      Returns a string representation of this SharedInteger.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this SharedInteger.