public abstract class Property extends Object
Title: Property
Description: An abstract property.
Copyright: Copyright 2003-2014, Knowledge Science Group, University of Calgary. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The Knowledge Science Group makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
Modifier and Type | Field and Description |
---|---|
static int |
BOOLEAN
Constant used to indicate a boolean property type.
|
static int |
BYTE
Constant used to indicate a boolean property type.
|
static int |
CHAR
Constant used to indicate a boolean property type.
|
static int |
DOUBLE
Constant used to indicate a floating point property type.
|
static int |
FLOAT
Constant used to indicate a floating point property type.
|
static int |
INTEGER
Constant used to indicate an integer property type.
|
static int |
LONG
Constant used to indicate a floating point property type.
|
static int |
SHORT
Constant used to indicate a boolean property type.
|
static int |
STRING
Constant used to indicate a string property type.
|
Constructor and Description |
---|
Property() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
equals(Object object)
Determines if the current property is equal to the given object.
|
static Property |
fromString(String property)
Creates a
Property that is decoded from the given
String and returns it. |
boolean |
getBoolean()
Retrieves the boolean value of the property.
|
byte |
getByte()
Retrieves the byte value of the property.
|
char |
getChar()
Retrieves the char value of the property.
|
double |
getDouble()
Retrieves the double precision floating point value of the property.
|
float |
getFloat()
Retrieves the floating point value of the property.
|
int |
getInteger()
Retrieves the integer value of the property.
|
long |
getLong()
Retrieves the long integer value of the property.
|
short |
getShort()
Retrieves the short value of the property.
|
String |
getString()
Retrieves the string value of the property.
|
abstract int |
getType()
Retrieves the type of property this is.
|
void |
setBoolean(boolean value)
Sets the boolean value of the property.
|
void |
setBtye(byte value)
Sets the byte value of the property.
|
void |
setChar(char value)
Sets the char value of the property.
|
void |
setDouble(double value)
Sets the double precision floating point value of the property.
|
void |
setFloat(float value)
Sets the floating point value of the property.
|
void |
setInteger(int value)
Sets the integer value of the property.
|
void |
setLong(long value)
Sets the long integer value of the property.
|
void |
setShort(short value)
Sets the short value of the property.
|
void |
setString(String value)
Sets the string value of the property.
|
abstract String |
toString()
Retreives the
String representation of the property. |
public static final int BOOLEAN
public static final int STRING
public static final int INTEGER
public static final int LONG
public static final int FLOAT
public static final int DOUBLE
public static final int CHAR
public static final int BYTE
public static final int SHORT
public abstract int getType()
public abstract String toString()
String
representation of the property.public abstract boolean equals(Object object)
public static Property fromString(String property) throws PropertyException
Property
that is decoded from the given
String
and returns it.property
- The property in String
form.PropertyException
- If the function has not been overridden.public char getChar() throws PropertyException
PropertyException
- If the property is not a
CharProperty
.public byte getByte() throws PropertyException
PropertyException
- If the property is not a
ByteProperty
.public short getShort() throws PropertyException
PropertyException
- If the property is not a
ShortProperty
.public boolean getBoolean() throws PropertyException
PropertyException
- If the property is not a
BooleanProperty
.public void setBoolean(boolean value) throws PropertyException
value
- The new boolean value of the property.PropertyException
- If the property is not a
BooleanProperty
.public void setChar(char value) throws PropertyException
value
- The new char value of the property.PropertyException
- If the property is not a
CharProperty
.public void setBtye(byte value) throws PropertyException
value
- The new byte value of the property.PropertyException
- If the property is not a
ByteProperty
.public void setShort(short value) throws PropertyException
value
- The new short value of the property.PropertyException
- If the property is not a
ShortProperty
.public String getString() throws PropertyException
PropertyException
- If the property is not a
StringProperty
.public void setString(String value) throws PropertyException
value
- The new string value of the property.PropertyException
- If the property is not a
StringProperty
.public int getInteger() throws PropertyException
PropertyException
- If the property is not a
IntegerProperty
.public void setInteger(int value) throws PropertyException
value
- The new integer value of the property.PropertyException
- If the property is not a
IntegerProperty
.public long getLong() throws PropertyException
PropertyException
- If the property is not a
LongProperty
.public void setLong(long value) throws PropertyException
value
- The new long integer value of the property.PropertyException
- If the property is not a
LongProperty
.public float getFloat() throws PropertyException
PropertyException
- If the property is not a
FloatProperty
public void setFloat(float value) throws PropertyException
value
- The new floating point value of the property.PropertyException
- If the property is not a
FloatProperty
.public double getDouble() throws PropertyException
PropertyException
- If the property is not a
DoubleProperty
public void setDouble(double value) throws PropertyException
value
- The new double precision floating point value of the
property.PropertyException
- If the property is not a
DoubleProperty
.