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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd value to previously existing variable.voidadd(Statistics.Variables var)Adds to this instance the instance varvoidclear()Clear all the variablesclone()longReturns a variable valueiterator()Iterate over the variablesvoidprint(PrintWriter out, double diff)Prints the variablevoidPut a new variable at the MapMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-