Class FormResult

java.lang.Object
net.chen.legacyLand.gui.FormResult

public class FormResult extends Object
表单提交结果容器 存储表单中所有元素的值
  • Constructor Details

    • FormResult

      public FormResult()
  • Method Details

    • put

      public void put(String elementId, Object value)
      添加表单数据
      Parameters:
      elementId - 元素 ID
      value - 值
    • get

      public Object get(String elementId)
      获取表单数据
      Parameters:
      elementId - 元素 ID
      Returns:
      值(可能为 null)
    • getString

      public String getString(String elementId)
      获取字符串类型的数据
      Parameters:
      elementId - 元素 ID
      Returns:
      字符串值
    • getInt

      public Integer getInt(String elementId)
      获取整数类型的数据
      Parameters:
      elementId - 元素 ID
      Returns:
      整数值
    • getDouble

      public Double getDouble(String elementId)
      获取双精度浮点数类型的数据
      Parameters:
      elementId - 元素 ID
      Returns:
      双精度浮点数值
    • getBoolean

      public Boolean getBoolean(String elementId)
      获取布尔类型的数据
      Parameters:
      elementId - 元素 ID
      Returns:
      布尔值
    • contains

      public boolean contains(String elementId)
      检查是否包含指定元素的数据
      Parameters:
      elementId - 元素 ID
      Returns:
      是否包含
    • markSubmitted

      public void markSubmitted()
      标记表单为已提交
    • markCancelled

      public void markCancelled()
      标记表单为已取消