add isError and isSuccess method
This commit is contained in:
parent
51866eceb7
commit
69ab26f6f4
@ -102,4 +102,14 @@ public class R<T> implements Serializable
|
||||
{
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public Boolean isError()
|
||||
{
|
||||
return !isSuccess();
|
||||
}
|
||||
|
||||
public Boolean isSuccess()
|
||||
{
|
||||
return R.SUCCESS == getCode();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user