com.swfm.mica.core
Class MiUserData

java.lang.Object
  extended bycom.swfm.mica.core.MiUserData

public class MiUserData
extends java.lang.Object

Version:
%I% %G%
Author:
Michael L. Davis

Constructor Summary
MiUserData()
           
 
Method Summary
 MiUserData copy()
           
 int getNumberOfResources()
          Gets the number of resources assigned to this MiPart.
 java.lang.Object getResource(java.lang.String name)
          Gets the value of the named resource.
 java.lang.String getResourceName(int index)
          Gets the name of the ith resource assigned to this MiPart.
 void removeResource(java.lang.String name)
          Removes the named resource.
 void setResource(java.lang.String name, java.lang.Object value)
          Sets (or adds if not already present) the value of the named resource.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MiUserData

public MiUserData()
Method Detail

copy

public MiUserData copy()

setResource

public void setResource(java.lang.String name,
                        java.lang.Object value)
Sets (or adds if not already present) the value of the named resource. These resources are to be specified by the programmer - these are not built-in resources.

Parameters:
name - the name of the resource
value - the value of the resource
See Also:
getResource(java.lang.String), removeResource(java.lang.String)

getResource

public java.lang.Object getResource(java.lang.String name)
Gets the value of the named resource.

Parameters:
name - the name of the resource
Returns:
the value of the resource, or null if no such resource exists
See Also:
setResource(java.lang.String, java.lang.Object)

removeResource

public void removeResource(java.lang.String name)
Removes the named resource. This is the same as setting the resource's value to null.

Parameters:
name - the name of the resource
See Also:
setResource(java.lang.String, java.lang.Object)

getNumberOfResources

public int getNumberOfResources()
Gets the number of resources assigned to this MiPart.

Returns:
the number of resources
See Also:
getResourceName(int)

getResourceName

public java.lang.String getResourceName(int index)
Gets the name of the ith resource assigned to this MiPart.

Parameters:
index - the index of the resource
Returns:
the name of the resource
Throws:
java.lang.IllegalArgumentException - If index is out of range.
See Also:
getNumberOfResources()

toString

public java.lang.String toString()