org.iscreen.impl
Class ResourceValue

java.lang.Object
  extended by org.iscreen.impl.ResourceValue

public class ResourceValue
extends java.lang.Object

A ResourceValue is a combination of a key and the Resource that's associated with it. Fundamentally, then, an instance of this class represents a value within a Resource prior to "realizing" that value.

Author:
Shellman, Dan

Field Summary
protected  java.lang.String key
           
protected  Resource resource
           
protected  java.lang.String value
           
 
Constructor Summary
ResourceValue(Resource theResource, java.lang.String theKey)
          Construct with given resource and key.
ResourceValue(java.lang.String theValue)
          Construct with the given value.
 
Method Summary
 java.lang.String getValue(java.util.Locale locale)
          Retrieves the value associated with this key/resource pair that this instance represents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resource

protected Resource resource

key

protected java.lang.String key

value

protected java.lang.String value
Constructor Detail

ResourceValue

public ResourceValue(Resource theResource,
                     java.lang.String theKey)
Construct with given resource and key.

Parameters:
theResource - The Resource.
theKey - The key to the value within the Resource.

ResourceValue

public ResourceValue(java.lang.String theValue)
Construct with the given value. In this case, no resource or key are involved.

Parameters:
theValue - The value of this resource/key pair.
Method Detail

getValue

public java.lang.String getValue(java.util.Locale locale)
Retrieves the value associated with this key/resource pair that this instance represents.

Parameters:
locale - The locale to use in getting the value.
Returns:
Returns the value associated with the key and Resource.