Skip to content

Instantly share code, notes, and snippets.

@ayato-p
Last active December 11, 2015 23:48
Show Gist options
  • Save ayato-p/4679067 to your computer and use it in GitHub Desktop.
Save ayato-p/4679067 to your computer and use it in GitHub Desktop.
public class Constants{
public static final Constants HOGE_CD = new Constants( "1" );
public static final Constants PIYO_CD = new Constants( "2" );
//つらつらと色々な定数が定義されてます…
private String value;
/**
* コンストラクタ
*/
private Constants( String pValue ) {
this.value = pValue;
}
/**
* 定数値取得
*/
public String getValue() {
return value;
}
/**
* 定数値取得
*/
public Integer getIntegerValue() {
return Integer.valueOf( value );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment