com.miginfocom.ashape.interaction
Class PropertyExpression

java.lang.Object
  extended by com.miginfocom.ashape.interaction.PropertyExpression
All Implemented Interfaces:
Expression, java.io.Serializable

public class PropertyExpression
extends java.lang.Object
implements Expression

An expression that is a number of property/value pairs. Normally used to pass configuration information as a Expression type. Alywas evaluates to false.

See Also:
Serialized Form

Constructor Summary
PropertyExpression(java.util.Map props)
          Constructor for a map of properties.
PropertyExpression(PropertyKey property, java.lang.Object value)
          Constructor for singleproperty
 
Method Summary
 boolean equals(java.lang.Object o)
           
 boolean evaluate(PropertyProvider provider)
          Always evaluates to false.
 java.util.Map getProperties()
          Return a cloned map of the properties.
 java.lang.Object getProperty(PropertyKey key, java.lang.Object defObj)
          Returns a value for the property.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyExpression

public PropertyExpression(PropertyKey property,
                          java.lang.Object value)
Constructor for singleproperty

Parameters:
property - The key.
value - The value.

PropertyExpression

public PropertyExpression(java.util.Map props)
Constructor for a map of properties. Keys should all be strings or they will not be retrievable.

Parameters:
props - The properties. Not null.
Method Detail

getProperties

public java.util.Map getProperties()
Return a cloned map of the properties.

Returns:
A cloned map of the properties.

getProperty

public java.lang.Object getProperty(PropertyKey key,
                                    java.lang.Object defObj)
Returns a value for the property.

Parameters:
key - The key.
defObj - The object to be returned if the key don't exist.
Returns:
The value for key or defObj if the key don't exist.

evaluate

public boolean evaluate(PropertyProvider provider)
Always evaluates to false.

Specified by:
evaluate in interface Expression
Parameters:
provider - Not used.
Returns:
false.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.