public enum ExitCode extends Enum<ExitCode>
Enum Constant and Description |
---|
ERROR
执行遇到错误 1
|
NULL
程序没有 exitCode
|
SUCCESS
执行成功 0
|
Modifier and Type | Method and Description |
---|---|
Integer |
getCode() |
static boolean |
isFailed(Integer exitCode)
判断是否执行失败
|
static boolean |
isSuccess(Integer exitCode)
判断是否执行成功
|
static ExitCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ExitCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ExitCode SUCCESS
public static final ExitCode ERROR
public static final ExitCode NULL
public static ExitCode[] values()
for (ExitCode c : ExitCode.values()) System.out.println(c);
public static ExitCode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Integer getCode()
public static boolean isSuccess(Integer exitCode)
exitCode
- exitCodepublic static boolean isFailed(Integer exitCode)
exitCode
- exitCodeCopyright © 2024. All rights reserved.