モジュール pro.eng.yui.YuiFramework

インタフェース IEnvPropUtil


public interface IEnvPropUtil
Define common Environment and Properties operations
導入されたバージョン:
1.0.0
バージョン:
1.0.0
作成者:
yui-KITAMURA
  • メソッドの詳細

    • getEnv

      @Contract("null -> fail; !null -> new") String getEnv(String key)
      Get System Environment Value stored with key
      パラメータ:
      key - system environment variables key
      戻り値:
      if exists, then that value, else ""(Empty string)
    • getEnv

      @Contract("null,_ -> fail; !null,_ -> _") String getEnv(String key, String defaultValue)
      Get System Environment Value stored with key. If not exists, then return the defaultValue
      パラメータ:
      key - system environment variables key
      defaultValue - default value when the variables not exists
      戻り値:
      if exists, then that value, else the defaultValue
    • getProp

      @Contract("null -> fail; !null -> _") String getProp(String key)
      Get properties value.
      パラメータ:
      key - properties key
      戻り値:
      if exists, then that value, else ""(Empty string)
    • getProp

      @Contract("null,_ -> fail; !null,_ -> _") String getProp(String key, String defaultValue)
      Get properties value. If not exists, then return the defaultValue
      パラメータ:
      key - properties key
      defaultValue - default value when the properties not exists
      戻り値:
      if exists, then that properties value, else the defaultValue
    • setProp

      @Contract("null,_ -> fail; _,null -> fail; _,_ -> _") void setProp(String key, String value) throws IllegalStateException
      Set properties value. If already exist, then throw exception.
      パラメータ:
      key - properties key
      value - set value
      例外:
      IllegalStateException - Already properties key-value set exists
    • setPropForce

      @Contract("null,_ -> fail; _,null -> fail; _,_ -> _") boolean setPropForce(String key, String value)
      Set properties value. If already exist, then overwrite the value.
      パラメータ:
      key - properties key
      value - set value
      戻り値:
      true when overwrite