org.rythmengine.template
Class ITag.__ParameterList

java.lang.Object
  extended by org.rythmengine.template.ITag.__ParameterList
All Implemented Interfaces:
Iterable<ITag.__Parameter>
Enclosing interface:
ITag

public static class ITag.__ParameterList
extends Object
implements Iterable<ITag.__Parameter>

A list of ITag.__Parameter


Constructor Summary
ITag.__ParameterList()
           
 
Method Summary
 void add(String name, Object value)
          Add an new parameter to the list specified by name and value
 Map<String,Object> asMap()
          Convert the parameter list into a map mapped values to names
 ITag.__Parameter get(int i)
          Get a ITag.__Parameter instance by position in the list
 Object getByName(String name)
          Return parameter value by name from the list
<T> T
getByName(String name, T defVal)
          Return parameter value by name and do type cast to left value type.
 Object getByPosition(int pos)
          Get parameter value by position in the list
 Object getDefault()
          Get default parameter value.
 Iterator<ITag.__Parameter> iterator()
           
 int size()
          How many parameters are stored in the list
 String toUUID()
          Used to create unique key for @cacheFor() transformer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ITag.__ParameterList

public ITag.__ParameterList()
Method Detail

add

public void add(String name,
                Object value)
Add an new parameter to the list specified by name and value

Parameters:
name -
value -

getByName

public Object getByName(String name)
Return parameter value by name from the list

Parameters:
name -
Returns:
parameter by name

getByName

public <T> T getByName(String name,
                       T defVal)
Return parameter value by name and do type cast to left value type. A default value is specified in case the parameter does not exist in the list

Type Parameters:
T -
Parameters:
name -
defVal -
Returns:
parameter by name

getDefault

public Object getDefault()
Get default parameter value. Which is the first parameter in the list

Returns:
default parameter

getByPosition

public Object getByPosition(int pos)
Get parameter value by position in the list

Parameters:
pos -
Returns:
parameter by position

iterator

public Iterator<ITag.__Parameter> iterator()
Specified by:
iterator in interface Iterable<ITag.__Parameter>

size

public int size()
How many parameters are stored in the list

Returns:
size of the param list

get

public ITag.__Parameter get(int i)
Get a ITag.__Parameter instance by position in the list

Parameters:
i -
Returns:
parameter by position

asMap

public Map<String,Object> asMap()
Convert the parameter list into a map mapped values to names

Returns:
parameter as map mapped by name

toUUID

public String toUUID()
Used to create unique key for @cacheFor() transformer

Returns:
the UUID string


Copyright © 2013. All Rights Reserved.