mro.util.properties
Class Property

java.lang.Object
  extended by mro.util.properties.Property
Direct Known Subclasses:
PropertyAverage, PropertyGroup

public class Property
extends java.lang.Object

A property of some kind with description. Used in many objects to make presentation of results easier. Handles String, boolean, int, double fairly well... Not for anything else, yet.

Version:
061127
Author:
Magnus Rosell

Field Summary
static boolean roundValue
           
 
Constructor Summary
Property()
           
Property(Property p2)
          Copy Constructor.
Property(java.lang.String name, boolean value, java.lang.String propertyDescription)
           
Property(java.lang.String name, double value, java.lang.String propertyDescription)
           
Property(java.lang.String name, int value, java.lang.String propertyDescription)
           
Property(java.lang.String name, java.lang.String value, boolean string, java.lang.String propertyDescription)
          To read from XML files...
Property(java.lang.String name, java.lang.String value, java.lang.String propertyDescription)
           
 
Method Summary
 void addValueDescription(PropertyValueDescription cpvd)
           
 void addVectorOfValueDescriptions(java.util.Vector vvd)
           
 java.util.Vector getAllValueDescriptions()
           
 java.lang.String getAppropriateValueDescription()
           
 java.lang.String getDescription()
           
 int getKind()
          Returns an int telling what kind of value. 0 - String, 1 - boolean, 2 - integer, 3 - double.
 java.lang.String getName()
           
 java.lang.Object getValue()
           
 void printXML(java.io.PrintWriter pw)
           
 void setValue(java.lang.Object value)
           
 java.lang.String toEvaluationFileString()
           
 java.lang.String toHTMLString()
           
 java.lang.String toInfoFileString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

roundValue

public static boolean roundValue
Constructor Detail

Property

public Property()

Property

public Property(java.lang.String name,
                java.lang.String value,
                java.lang.String propertyDescription)

Property

public Property(java.lang.String name,
                int value,
                java.lang.String propertyDescription)

Property

public Property(java.lang.String name,
                double value,
                java.lang.String propertyDescription)

Property

public Property(java.lang.String name,
                boolean value,
                java.lang.String propertyDescription)

Property

public Property(Property p2)
Copy Constructor.


Property

public Property(java.lang.String name,
                java.lang.String value,
                boolean string,
                java.lang.String propertyDescription)
To read from XML files...

Method Detail

setValue

public void setValue(java.lang.Object value)

getValue

public java.lang.Object getValue()

getKind

public int getKind()
Returns an int telling what kind of value. 0 - String, 1 - boolean, 2 - integer, 3 - double.

Returns:
an int

getName

public java.lang.String getName()

getDescription

public java.lang.String getDescription()

addValueDescription

public void addValueDescription(PropertyValueDescription cpvd)

addVectorOfValueDescriptions

public void addVectorOfValueDescriptions(java.util.Vector vvd)

getAppropriateValueDescription

public java.lang.String getAppropriateValueDescription()

getAllValueDescriptions

public java.util.Vector getAllValueDescriptions()

printXML

public void printXML(java.io.PrintWriter pw)
              throws java.io.IOException
Throws:
java.io.IOException

toHTMLString

public java.lang.String toHTMLString()

toEvaluationFileString

public java.lang.String toEvaluationFileString()

toInfoFileString

public java.lang.String toInfoFileString()