0
0

More than 3 years have passed since last update.

Enum を利用した判定ロジック

Posted at

public enum KensyuStsKbn {
    /** 0:OK_ALL    */  OkAll(0),
    /** 1:OK_PART   */  OkPart(1),
    /** 2:NG_ALL    */  NgAll(2),
    /** 3:NG_PART   */  NgPart(3);


    /**
     * OK
     */
    public static final KensyuStsKbn[] GpOKCheck = {
        OkAll,
        OkPart,
    };
    /**
     * OKチェック
     * @return true:OK  / false:NG
     */
    public boolean isGpOKCheck() {
        return Arrays.asList(GpOKCheck).contains(this);
    }

}


0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0