Class SharedInteger
java.lang.Object
cl.netswitch.lib.server.SharedValue
cl.netswitch.lib.server.SharedInteger
Contains an Integer value that is shared by all servers.
-
Constructor Summary
ConstructorsConstructorDescriptionSharedInteger
(String name, int inival) Constructs a newSharedInteger
instance. -
Method Summary
Methods inherited from class SharedValue
getName
-
Constructor Details
-
SharedInteger
Constructs a newSharedInteger
instance.- Parameters:
name
- the name of this SharedInteger.inival
- the initial value of this SharedInteger.- Throws:
NullPointerException
- ifname
isnull
.
-
-
Method Details
-
get
public int get()Returns the value of thisSharedInteger
.- Returns:
- the value of this
SharedInteger
.
-
set
public void set(int value) Changes the value of thisSharedInteger
.- Parameters:
value
- the new value of thisSharedInteger
.
-
parse
Changes the value of thisSharedInteger
.- Specified by:
parse
in classSharedValue
- Parameters:
text
- the string representation of the new value.- Throws:
IllegalArgumentException
- iftext
is invalid.
-
toString
-