The Claim class holds the value in a generic way so that it can be recovered in many representations.
| 8 | * The Claim class holds the value in a generic way so that it can be recovered in many representations. |
| 9 | */ |
| 10 | public interface Claim { |
| 11 | |
| 12 | |
| 13 | /** |
| 14 | * Get this Claim as a Boolean. |
| 15 | * If the value isn't of type Boolean or it can't be converted to a Boolean, null will be returned. |
| 16 | * |
| 17 | * @return the value as a Boolean or null. |
| 18 | */ |
| 19 | @Nullable |
| 20 | Boolean asBoolean(); |
| 21 | |
| 22 | /** |
| 23 | * Get this Claim as an Integer. |
| 24 | * If the value isn't of type Integer or it can't be converted to an Integer, null will be returned. |
| 25 | * |
| 26 | * @return the value as an Integer or null. |
| 27 | */ |
| 28 | @Nullable |
| 29 | Integer asInt(); |
| 30 | |
| 31 | /** |
| 32 | * Get this Claim as an Long. |
| 33 | * If the value isn't of type Long or it can't be converted to an Long, null will be returned. |
| 34 | * |
| 35 | * @return the value as an Long or null. |
| 36 | */ |
| 37 | @Nullable |
| 38 | Long asLong(); |
| 39 | |
| 40 | /** |
| 41 | * Get this Claim as a Double. |
| 42 | * If the value isn't of type Double or it can't be converted to a Double, null will be returned. |
| 43 | * |
| 44 | * @return the value as a Double or null. |
| 45 | */ |
| 46 | @Nullable |
| 47 | Double asDouble(); |
| 48 | |
| 49 | /** |
| 50 | * Get this Claim as a String. |
| 51 | * If the value isn't of type String or it can't be converted to a String, null will be returned. |
| 52 | * |
| 53 | * @return the value as a String or null. |
| 54 | */ |
| 55 | @Nullable |
| 56 | String asString(); |
| 57 | |
| 58 | /** |
| 59 | * Get this Claim as a Date. |
| 60 | * If the value can't be converted to a Date, null will be returned. |
| 61 | * |
| 62 | * @return the value as a Date or null. |
| 63 | */ |
| 64 | @Nullable |
| 65 | Date asDate(); |
| 66 | |
| 67 | /** |
no outgoing calls
no test coverage detected