de.cau.cs.kieler.sim.kiem.properties
Class KiemProperty

java.lang.Object
  extended by de.cau.cs.kieler.sim.kiem.properties.KiemProperty
All Implemented Interfaces:
Serializable

public class KiemProperty
extends Object
implements Serializable

The Class KiemProperty. This is the basic serializable KiemProperty implementation which can hold a key value pair of types String and also a KiemPropertyType. The contents of the KiemProperty can be saved and loaded but the KiemPropertyType is recovered by its identifier.

See Also:
Serialized Form
Rating yellow
(2009-01-15)

Constructor Summary
KiemProperty(String keyParam)
          Instantiates a new String KiemProperty with empty default value.
KiemProperty(String keyParam, boolean valueParam)
          Instantiates a new boolean KiemProperty with given default value.
KiemProperty(String keyParam, int valueParam)
          Instantiates a new int KiemProperty with given default value.
KiemProperty(String keyParam, KiemPropertyType typeParam)
          Instantiates a new KiemProperty of given type with empty default value.
KiemProperty(String keyParam, KiemPropertyType typeParam, int valueParam)
          Instantiates a new KiemProperty of given type with given default value.
KiemProperty(String keyParam, KiemPropertyType typeParam, String valueParam)
          Instantiates a new String KiemProperty, with given default value.
KiemProperty(String keyParam, String valueParam)
          Instantiates a new String KiemProperty with given default value.
 
Method Summary
 String getDirectory()
          Gets the directory as a String.
 String getFilePath()
          Gets the file path as a String.
 String getKey()
          Gets the key of the KiemProperty.
 KiemPropertyType getType()
          Gets the type of the KiemProperty.
 String getValue()
          Gets the value of the KiempProperty.
 boolean getValueAsBoolean()
          Gets the value as boolean value.
 int getValueAsInt()
          Gets the value as an integer value.
 void setType(KiemPropertyType typeParam)
          Sets the KIEM property type.
 void setValue(String valueParam)
          Sets the value of the KiemPorperty.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KiemProperty

public KiemProperty(String keyParam,
                    KiemPropertyType typeParam,
                    String valueParam)
Instantiates a new String KiemProperty, with given default value.

Parameters:
keyParam - the key of this property
typeParam - the type of this property
valueParam - the value of this property

KiemProperty

public KiemProperty(String keyParam,
                    KiemPropertyType typeParam,
                    int valueParam)
Instantiates a new KiemProperty of given type with given default value.

Parameters:
keyParam - the key of this property
typeParam - the type of this property
valueParam - the value of this property

KiemProperty

public KiemProperty(String keyParam,
                    KiemPropertyType typeParam)
Instantiates a new KiemProperty of given type with empty default value.

Parameters:
keyParam - the key of this property
typeParam - the type of this property

KiemProperty

public KiemProperty(String keyParam)
Instantiates a new String KiemProperty with empty default value.

Parameters:
keyParam - the key of this property

KiemProperty

public KiemProperty(String keyParam,
                    String valueParam)
Instantiates a new String KiemProperty with given default value.

Parameters:
keyParam - the key of this property
valueParam - the value of this property

KiemProperty

public KiemProperty(String keyParam,
                    int valueParam)
Instantiates a new int KiemProperty with given default value.

Parameters:
keyParam - the key of this property
valueParam - the value of this property

KiemProperty

public KiemProperty(String keyParam,
                    boolean valueParam)
Instantiates a new boolean KiemProperty with given default value.

Parameters:
keyParam - the key of this property
valueParam - the value of this property
Method Detail

getKey

public String getKey()
Gets the key of the KiemProperty.

Returns:
the String property key

getValue

public String getValue()
Gets the value of the KiempProperty.

Returns:
the String property value

getValueAsBoolean

public final boolean getValueAsBoolean()
Gets the value as boolean value.

Returns:
the value as boolean

getValueAsInt

public final int getValueAsInt()
Gets the value as an integer value.

Returns:
the value as integer

getType

public KiemPropertyType getType()
Gets the type of the KiemProperty.

Returns:
the KiemPropertyType

setType

public void setType(KiemPropertyType typeParam)
Sets the KIEM property type.

Parameters:
typeParam - the new property type

setValue

public void setValue(String valueParam)
Sets the value of the KiemPorperty.

Parameters:
valueParam - the new String property value

getFilePath

public String getFilePath()
Gets the file path as a String. This interprets the property value as a file path.

Returns:
the String file path

getDirectory

public String getDirectory()
Gets the directory as a String. This interprets the property value as a file and extracts the directory out of it.

Returns:
the String directory