Package com.io7m.jproperties.monad
Class JPropertyError
java.lang.Object
com.io7m.jproperties.monad.JPropertyError
- All Implemented Interfaces:
JPropertyParseMonadType.JPropertyErrorType
public final class JPropertyError
extends Object
implements JPropertyParseMonadType.JPropertyErrorType
The type of parse errors.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic JPropertyError.Builderbuilder()Creates a builder forJPropertyError.static JPropertyErrorCreates an immutable copy of aJPropertyParseMonadType.JPropertyErrorTypevalue.booleanThis instance is equal to all instances ofJPropertyErrorthat have equal attribute values.inthashCode()Computes a hash code from attributes:message.message()static JPropertyErrorConstruct a new immutableJPropertyErrorinstance.toString()Prints the immutable valueJPropertyErrorwith attribute values.final JPropertyErrorwithMessage(String value) Copy the current immutable object by setting a value for themessageattribute.
-
Method Details
-
message
- Specified by:
messagein interfaceJPropertyParseMonadType.JPropertyErrorType- Returns:
- The error message
-
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 ofJPropertyErrorthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:message. -
toString
Prints the immutable valueJPropertyErrorwith attribute values. -
of
Construct a new immutableJPropertyErrorinstance.- Parameters:
message- The value for themessageattribute- Returns:
- An immutable JPropertyError instance
-
copyOf
Creates an immutable copy of aJPropertyParseMonadType.JPropertyErrorTypevalue. 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 JPropertyError instance
-
builder
Creates a builder forJPropertyError.- Returns:
- A new JPropertyError builder
-