public class Namespace extends Object
 This class holds attributes added by
 ArgumentParser.parseArgs(String[]).
 
 It is just a wrapper of Map object which stores actual attributes.
 Map object can be retrieved using getAttrs(). This class
 provides several shortcut methods to get attribute values.
 toString() provides nice textual representation of stored
 attributes.
 
| Constructor and Description | 
|---|
| Namespace(Map<String,Object> attrs)Construct this object using given  attrs. | 
| Modifier and Type | Method and Description | 
|---|---|
| <T> T | get(String dest)Returns attribute with given attribute name  dest. | 
| Map<String,Object> | getAttrs()
 Returns  Mapobject holding attribute values. | 
| Boolean | getBoolean(String dest)Returns attribute as  Booleanwith given attribute namedest. | 
| Byte | getByte(String dest)Returns attribute as  Bytewith given attribute namedest. | 
| Double | getDouble(String dest)Returns attribute as  Doublewith given attribute namedest. | 
| Float | getFloat(String dest)Returns attribute as  Floatwith given attribute namedest. | 
| Integer | getInt(String dest)Returns attribute as  Integerwith given attribute namedest. | 
| <E> List<E> | getList(String dest)Returns attribute as  Listwith given attribute namedest. | 
| Long | getLong(String dest)Returns attribute as  Longwith given attribute namedest. | 
| Short | getShort(String dest)Returns attribute as  Shortwith given attribute namedest. | 
| String | getString(String dest)Returns attribute as  Stringwith given attribute namedest. | 
| String | toString() | 
public <T> T get(String dest)
dest.dest - The attribute namenull if it is not found.public String getString(String dest)
String with given attribute name
 dest. This method calls Object.toString() method of a
 found object to get string representation unless object is null.dest - The attribute nameString, or null if
         is not found.public Byte getByte(String dest)
Byte with given attribute name dest.dest - The attribute nameByte, or null if it
         is not found.public Short getShort(String dest)
Short with given attribute name dest
 .dest - The attribute nameShort, or null if
         it is not found.public Integer getInt(String dest)
Integer with given attribute name
 dest.dest - The attribute nameInteger, or null if
         it is not found.public Long getLong(String dest)
Long with given attribute name dest.dest - The attribute nameLong, or null if it
         is not found.public Float getFloat(String dest)
Float with given attribute name dest
 .dest - The attribute nameFloat, or null if
         it is not found.public Double getDouble(String dest)
Double with given attribute name
 dest.dest - The attribute nameDouble, or null if
         it is not found.public Boolean getBoolean(String dest)
Boolean with given attribute name
 dest.dest - The attribute nameBoolean, or null if
         it is not found.public <E> List<E> getList(String dest)
List with given attribute name dest.dest - The attribute nameList, or null if it
         is not found.public Map<String,Object> getAttrs()
 Returns Map object holding attribute values.
 
The application code can freely use returned object.
Map object holding attribute values.Copyright © 2012–2017. All rights reserved.