Package marauroa.server.game
Class Statistics.Variables
java.lang.Object
marauroa.server.game.Statistics.Variables
- Enclosing class:
- Statistics
This class is very similar to a Map with the extra that
adds some comodity methods like:
- add
- Author:
- miguel
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add value to previously existing variable.void
add(Statistics.Variables var)
Adds to this instance the instance varvoid
clear()
Clear all the variablesclone()
long
Returns a variable valueiterator()
Iterate over the variablesvoid
print(PrintWriter out, double diff)
Prints the variablevoid
Put a new variable at the MapMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Variables
public Variables()Constructor
-
-
Method Details
-
clear
public void clear()Clear all the variables -
put
Put a new variable at the Map- Parameters:
type
- name of the variablevalue
- its value
-
add
Add value to previously existing variable.- Parameters:
type
- name of the variablevalue
- value to add
-
get
Returns a variable value- Parameters:
type
- name of the variable- Returns:
- its value
-
iterator
Iterate over the variables -
add
Adds to this instance the instance var- Parameters:
var
- a instance of Variables to add to this one.
-
print
Prints the variable- Parameters:
out
- the writer to write todiff
- ignored
-
clone
-