edu.turtlekit2.utils
Class XMLAttributes

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,String>
          extended by edu.turtlekit2.utils.XMLAttributes
All Implemented Interfaces:
Serializable, Cloneable, Map<String,String>

public class XMLAttributes
extends HashMap<String,String>

XmlAttributes encodes the agents/patches/genomes/etc parameters in a Hashtable.

Author:
Gregory Beurier
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
XMLAttributes()
           
 
Method Summary
 boolean getBool(String name)
          getter for Boolean attribute
 boolean getBool(String name, boolean defaultValue)
           
 Color getColor(String key)
           
 Color getColor(String key, Color defaultValue)
           
 double getDouble(String name)
          getter for Double attribute
 double getDouble(String name, double defaultValue)
          getter for Double attribute
 float getFloat(String name)
          getter for Float attribute
 float getFloat(String name, float defaultValue)
          getter for Float attribute
 int getInt(String name)
          getter for Integer attribute
 int getInt(String name, int defaultValue)
          getter for Integer attribute
 String getString(String name)
          getter for String attribute
 String getString(String name, String defaultValue)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

XMLAttributes

public XMLAttributes()
Method Detail

getInt

public int getInt(String name)
getter for Integer attribute


getInt

public int getInt(String name,
                  int defaultValue)
getter for Integer attribute


getDouble

public double getDouble(String name)
getter for Double attribute


getDouble

public double getDouble(String name,
                        double defaultValue)
getter for Double attribute


getFloat

public float getFloat(String name)
getter for Float attribute


getFloat

public float getFloat(String name,
                      float defaultValue)
getter for Float attribute


getString

public String getString(String name)
getter for String attribute


getString

public String getString(String name,
                        String defaultValue)

getBool

public boolean getBool(String name)
getter for Boolean attribute


getBool

public boolean getBool(String name,
                       boolean defaultValue)

getColor

public Color getColor(String key)

getColor

public Color getColor(String key,
                      Color defaultValue)