Package com.io7m.brooklime.api
Class BLNexusError
java.lang.Object
com.io7m.brooklime.api.BLNexusError
- All Implemented Interfaces:
BLNexusErrorType
An error returned by the Nexus API.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic BLNexusError.Builderbuilder()Creates a builder forBLNexusError.static BLNexusErrorcopyOf(BLNexusErrorType instance) Creates an immutable copy of aBLNexusErrorTypevalue.booleanThis instance is equal to all instances ofBLNexusErrorthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,message.id()message()toString()Prints the immutable valueBLNexusErrorwith attribute values.final BLNexusErrorCopy the current immutable object by setting a value for theidattribute.final BLNexusErrorwithMessage(String value) Copy the current immutable object by setting a value for themessageattribute.
-
Method Details
-
id
- Specified by:
idin interfaceBLNexusErrorType- Returns:
- The error ID
-
message
- Specified by:
messagein interfaceBLNexusErrorType- Returns:
- The error message
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withMessage
Copy the current immutable object by setting a value for themessageattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for message- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofBLNexusErrorthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,message. -
toString
Prints the immutable valueBLNexusErrorwith attribute values. -
copyOf
Creates an immutable copy of aBLNexusErrorTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable BLNexusError instance
-
builder
Creates a builder forBLNexusError.BLNexusError.builder() .setId(String) // requiredid.setMessage(String) // requiredmessage.build();- Returns:
- A new BLNexusError builder
-