public class APIResult extends Object
Modifier and Type | Class and Description |
---|---|
static class |
APIResult.Status
API Result status.
|
Constructor and Description |
---|
APIResult(APIResult.Status status,
String message)
Instantiates a new API result.
|
Modifier and Type | Method and Description |
---|---|
static APIResult |
failure(Exception e) |
String |
getMessage()
The message.
|
APIResult.Status |
getStatus()
The status.
|
static APIResult |
partial(Exception e) |
static APIResult |
partial(int actual,
int expected) |
static APIResult |
success() |
static APIResult |
successOrPartialOrFailure(int actual,
int expected) |
static APIResult |
successOrPartialOrFailure(int actual,
int expected,
Exception e) |
String |
toString() |
public APIResult(APIResult.Status status, String message)
status
- the statusmessage
- the messagepublic static APIResult partial(int actual, int expected)
public static APIResult successOrPartialOrFailure(int actual, int expected)
public static APIResult successOrPartialOrFailure(int actual, int expected, Exception e)
public static APIResult success()
@Generated(value="lombok") public APIResult.Status getStatus()
@Generated(value="lombok") public String getMessage()
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.