net.sf.magicproject.action.context
Class ObjectArray<T>

java.lang.Object
  extended by net.sf.magicproject.action.context.ObjectArray<T>
Type Parameters:
T - the object type encapsulted in this context.
All Implemented Interfaces:
java.lang.Iterable<T>, ActionContext

public class ObjectArray<T>
extends java.lang.Object
implements ActionContext, java.lang.Iterable<T>

Since:
0.86
Author:
Fabrice Daugan

Constructor Summary
ObjectArray(int size)
          Create a new context with a new object array
 
Method Summary
 T getObject(int index)
          Return a object value of this context.
 java.util.Iterator<T> iterator()
           
 void setObject(int index, T b)
          Set an object value of this context.
 int size()
          Return amount of objects.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectArray

public ObjectArray(int size)
Create a new context with a new object array

Parameters:
size - the array's size of this context.
Method Detail

getObject

public T getObject(int index)
Return a object value of this context.

Parameters:
index - the object index to be returned
Returns:
the object value of this context.

setObject

public void setObject(int index,
                      T b)
Set an object value of this context.

Parameters:
index - the object index to be set
b - the object to set

size

public int size()
Return amount of objects.

Returns:
amount of objects.

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T>


Copyright © 2003-2007 Magic-Project. All Rights Reserved.