public class Result<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
String |
getCmd()
Retrieves the command name in String representation.
|
long |
getCode()
Retrieves the latest response code from the k2hdkc server.
|
long |
getDetailCode()
Retrieves the latest response code in details from the k2hdkc server.
|
T |
getValue()
Returns a value
|
boolean |
isSuccess()
Returns
true if the request result is success. |
static <T> Result<T> |
of(String cmd,
boolean isSuccess,
T value,
long code,
long detailCode)
Creates a Result instance.
|
String |
toString()
Returns full of members as a string.
|
public static <T> Result<T> of(String cmd, boolean isSuccess, T value, long code, long detailCode)
cmd - a command nameisSuccess - true if success. false otherwisevalue - a response data in binary formatcode - a response codedetailCode - a detail response codepublic boolean isSuccess()
true if the request result is success. false otherwise.true if the request result is success. false otherwise.public String getCmd()
public T getValue()
public long getCode()
public long getDetailCode()
Copyright © 2020. All rights reserved.