com.fatwire.gst.foundation.controller.action
Class Model

java.lang.Object
  extended by com.fatwire.gst.foundation.controller.action.Model

public class Model
extends Object

This class is a container for Model data in the Model View Controller (MVC) framework.

This class is not thread-safe.

Since:
Apr 16, 2011
Author:
Dolf Dijkstra

Constructor Summary
Model()
           
 
Method Summary
 void add(String key, Object... value)
          Adds the key/value pair, where are the values are added as a list.
 void add(String key, Object value)
          Adds the key/value pair.
 Set<Map.Entry<String,Object>> entries()
          Returns all the key/value pairs.
 boolean equals(Object obj)
           
 int hashCode()
           
 void list(String key, Object value)
          Adds the key/value pair, where are the value is added as a list.
 void reset()
          Clears the model data.
 void reset(String name)
          Removes the data with the name key.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Model

public Model()
Method Detail

reset

public void reset()
Clears the model data.


reset

public void reset(String name)
Removes the data with the name key.

Parameters:
name -

add

public void add(String key,
                Object value)
Adds the key/value pair.

Parameters:
key -
value -

add

public void add(String key,
                Object... value)
Adds the key/value pair, where are the values are added as a list.

Parameters:
key -
value -

list

public void list(String key,
                 Object value)
Adds the key/value pair, where are the value is added as a list.

Parameters:
key -
value -

entries

public Set<Map.Entry<String,Object>> entries()
Returns all the key/value pairs.

Returns:
the entries as an unmodifiableSet, never null.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2010-2013 Oracle Corporation. All Rights Reserved.