Package com.telenordigital.nbiot
Class ImmutableError
- java.lang.Object
-
- com.telenordigital.nbiot.ImmutableError
-
- All Implemented Interfaces:
BroadcastResult.Error
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableError extends Object implements BroadcastResult.Error
Immutable implementation ofBroadcastResult.Error.Use the builder to create immutable instances:
new ImmutableError.Builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableError.BuilderBuilds instances of typeImmutableError.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableErrorcopyOf(BroadcastResult.Error instance)Creates an immutable copy of aBroadcastResult.Errorvalue.StringdeviceID()The device ID.booleanequals(Object another)This instance is equal to all instances ofImmutableErrorthat have equal attribute values.inthashCode()Computes a hash code from attributes:deviceID,message.Stringmessage()The message.StringtoString()Prints the immutable valueErrorwith attribute values.ImmutableErrorwithDeviceID(String value)Copy the current immutable object by setting a value for thedeviceIDattribute.ImmutableErrorwithMessage(String value)Copy the current immutable object by setting a value for themessageattribute.
-
-
-
Method Detail
-
deviceID
public String deviceID()
The device ID.- Specified by:
deviceIDin interfaceBroadcastResult.Error
-
message
public String message()
The message.- Specified by:
messagein interfaceBroadcastResult.Error
-
withDeviceID
public final ImmutableError withDeviceID(String value)
Copy the current immutable object by setting a value for thedeviceIDattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deviceID- Returns:
- A modified copy of the
thisobject
-
withMessage
public final ImmutableError withMessage(String value)
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
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableErrorthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:deviceID,message.
-
toString
public String toString()
Prints the immutable valueErrorwith attribute values.
-
copyOf
public static ImmutableError copyOf(BroadcastResult.Error instance)
Creates an immutable copy of aBroadcastResult.Errorvalue. 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 Error instance
-
-