Interface ICustomProperty

All Known Implementing Classes:
CustomProperty

public interface ICustomProperty
The ICustomProperty interface defines methods for managing custom properties with various data types. It provides functionality to set and retrieve property values in different formats, as well as methods for type and equality handling.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object anObject)
    Tests for equality between two custom properties.
    boolean
    Retrieves the value of the property as a boolean.
    byte
    Retrieves the value of the property as a byte.
    char
    Retrieves the value of the property as a char.
    Retrieves the value of the property as a Color.
    double
    Retrieves the value of the property as a double.
    <T extends Enum<T>>
    T
    getAsEnum(Class<T> enumType)
    Retrieves the value of the property as an Enum.
    Retrieves the value of the property as a URL.
    float
    Retrieves the value of the property as a float.
    int
    Retrieves the value of the property as an int.
    long
    Retrieves the value of the property as a long.
    short
    Retrieves the value of the property as a short.
    Retrieves the value of the property as a String.
    int
    Retrieves the map object ID associated with this property.
    Retrieves the type of the property.
    int
    Returns the hash code for this custom property.
    void
    Sets the type of the property.
    void
    setValue(boolean value)
    Sets the value of the property as a boolean.
    void
    setValue(char value)
    Sets the value of the property as a char.
    void
    setValue(double value)
    Sets the value of the property as a double.
    void
    setValue(long value)
    Sets the value of the property as a long.
    void
    setValue(Color value)
    Sets the value of the property as a Color.
    void
    setValue(Enum<?> value)
    Sets the value of the property as an Enum.
    void
    Sets the value of the property as a String.
    void
    setValue(URL value)
    Sets the value of the property as a URL.
  • Method Details

    • setValue

      void setValue(URL value)
      Sets the value of the property as a URL.
      Parameters:
      value - the URL value to set
    • setValue

      void setValue(String value)
      Sets the value of the property as a String.
      Parameters:
      value - the String value to set
    • setValue

      void setValue(char value)
      Sets the value of the property as a char.
      Parameters:
      value - the char value to set
    • setValue

      void setValue(Enum<?> value)
      Sets the value of the property as an Enum.
      Parameters:
      value - the Enum value to set
    • setValue

      void setValue(long value)
      Sets the value of the property as a long.
      Parameters:
      value - the long value to set
    • setValue

      void setValue(double value)
      Sets the value of the property as a double.
      Parameters:
      value - the double value to set
    • setValue

      void setValue(boolean value)
      Sets the value of the property as a boolean.
      Parameters:
      value - the boolean value to set
    • setValue

      void setValue(Color value)
      Sets the value of the property as a Color.
      Parameters:
      value - the Color value to set
    • getAsString

      String getAsString()
      Retrieves the value of the property as a String.
      Returns:
      the property value as a String
    • getAsChar

      char getAsChar()
      Retrieves the value of the property as a char.
      Returns:
      the property value as a char
    • getAsBool

      boolean getAsBool()
      Retrieves the value of the property as a boolean.
      Returns:
      the property value as a boolean
    • getAsColor

      Color getAsColor()
      Retrieves the value of the property as a Color.
      Returns:
      the property value as a Color
    • getAsFloat

      float getAsFloat()
      Retrieves the value of the property as a float.
      Returns:
      the property value as a float
    • getAsDouble

      double getAsDouble()
      Retrieves the value of the property as a double.
      Returns:
      the property value as a double
    • getAsByte

      byte getAsByte()
      Retrieves the value of the property as a byte.
      Returns:
      the property value as a byte
    • getAsShort

      short getAsShort()
      Retrieves the value of the property as a short.
      Returns:
      the property value as a short
    • getAsInt

      int getAsInt()
      Retrieves the value of the property as an int.
      Returns:
      the property value as an int
    • getAsLong

      long getAsLong()
      Retrieves the value of the property as a long.
      Returns:
      the property value as a long
    • getAsEnum

      <T extends Enum<T>> T getAsEnum(Class<T> enumType)
      Retrieves the value of the property as an Enum.
      Type Parameters:
      T - the type of the Enum
      Parameters:
      enumType - the Class of the Enum type
      Returns:
      the property value as an Enum
    • getAsFile

      URL getAsFile()
      Retrieves the value of the property as a URL.
      Returns:
      the property value as a URL
    • getMapObjectId

      int getMapObjectId()
      Retrieves the map object ID associated with this property.
      Returns:
      the map object ID
    • getType

      String getType()
      Retrieves the type of the property.
      Returns:
      the property type as a String
    • setType

      void setType(String type)
      Sets the type of the property.
      Parameters:
      type - the property type as a String
    • equals

      boolean equals(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:
      equals in class Object
      Parameters:
      anObject - the custom property to test equality for
      Returns:
      true if the two custom properties are equal, or false otherwise
    • 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:
      hashCode in class Object
      Returns:
      the hash code for this custom property