Class EnumProperty

java.lang.Object
com.infoteria.asteria.flowlibrary2.property.ValueProperty
com.infoteria.asteria.flowlibrary2.property.EnumProperty
All Implemented Interfaces:
Property, Cloneable
Direct Known Subclasses:
HomeModeProperty

public class EnumProperty extends ValueProperty
列挙型のプロパティクラスです。
  • Constructor Details

    • EnumProperty

      public EnumProperty(String name)
      EnumProperty(name, false, true, null) と同じです。
    • EnumProperty

      public EnumProperty(String name, boolean required)
      EnumProperty(name, required, true, null) と同じです。
    • EnumProperty

      public EnumProperty(String name, boolean required, boolean mapable)
      EnumProperty(name, required, mapable, null) と同じです。
    • EnumProperty

      public EnumProperty(String name, boolean required, boolean mapable, String value)
      コンストラクタ
      Parameters:
      name - プロパティ名
      required - このプロパティが必須プロパティの場合はtrue
      mapable - このプロパティがMapping可能な場合はtrue
      value - デフォルト値
  • Method Details

    • canUseMacro

      public boolean canUseMacro()
    • addEnumeration

      public void addEnumeration(String value)
      プロパティ値として設定可能な列挙値を追加します。
    • getEnumList

      public List<String> getEnumList()
      使用可能な列挙値のリスト
    • setString

      public void setString(String value) throws PropertyException
      Description copied from class: ValueProperty
      コンパイル時に値を設定します。
      Overrides:
      setString in class ValueProperty
      Parameters:
      value - プロパティ値として設定される文字列
      Throws:
      PropertyException
    • clone

      public Object clone()
      Description copied from interface: Property
      プロパティのcloneメソッドです。
      Specified by:
      clone in interface Property
      Overrides:
      clone in class ValueProperty
    • strValue

      public String strValue() throws PropertyException
      プロパティ値を返します。
      Throws:
      PropertyException - プロパティ値として不正な値が設定されている場合
    • getIndex

      public int getIndex() throws PropertyException
      設定されているプロパティ値のインデックスを返します。
      インデックスはaddEnumerationメソッドで追加された順に0ベースで決まります。
      Throws:
      PropertyException - プロパティ値として不正な値が設定されている場合