Interface ICustomProperty
- All Known Implementing Classes:
CustomProperty
public interface ICustomPropertyRepresents a custom property on a map element.
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object anObject)Tests for equality between two custom properties.booleangetAsBool()bytegetAsByte()chargetAsChar()java.awt.ColorgetAsColor()doublegetAsDouble()<T extends java.lang.Enum<T>>
TgetAsEnum(java.lang.Class<T> enumType)java.net.URLgetAsFile()floatgetAsFloat()intgetAsInt()longgetAsLong()shortgetAsShort()java.lang.StringgetAsString()java.lang.StringgetType()inthashCode()Returns the hash code for this custom property.voidsetType(java.lang.String type)voidsetValue(boolean value)voidsetValue(char value)voidsetValue(double value)voidsetValue(long value)voidsetValue(java.awt.Color value)voidsetValue(java.lang.Enum<?> value)voidsetValue(java.lang.String value)voidsetValue(java.net.URL value)
Method Details
setValue
void setValue(java.net.URL value)setValue
void setValue(java.lang.String value)setValue
void setValue(char value)setValue
void setValue(java.lang.Enum<?> value)setValue
void setValue(long value)setValue
void setValue(double value)setValue
void setValue(boolean value)setValue
void setValue(java.awt.Color value)getAsString
java.lang.String getAsString()getAsChar
char getAsChar()getAsBool
boolean getAsBool()getAsColor
java.awt.Color getAsColor()getAsFloat
float getAsFloat()getAsDouble
double getAsDouble()getAsByte
byte getAsByte()getAsShort
short getAsShort()getAsInt
int getAsInt()getAsLong
long getAsLong()getAsEnum
<T extends java.lang.Enum<T>> T getAsEnum(java.lang.Class<T> enumType)getAsFile
java.net.URL getAsFile()getType
java.lang.String getType()setType
void setType(java.lang.String type)equals
boolean equals(java.lang.Object anObject)Tests for equality between two custom properties. Two custom properties are equal if they both have the same type and string value.- Overrides:
equalsin classjava.lang.Object- Parameters:
anObject- The custom property to test equality for- Returns:
- Whether the two custom properties are equal, or false
if
anObjectis not a custom property
hashCode
int hashCode()Returns the hash code for this custom property. The hash code for a custom property is equal to its type's hash code times 31 plus its value's hash code.- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hash code for this custom property
