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
-
Method Summary
Modifier and TypeMethodDescriptionstatic JPropertyError.Builder
builder()
Creates a builder forJPropertyError
.static JPropertyError
Creates an immutable copy of aJPropertyParseMonadType.JPropertyErrorType
value.boolean
This instance is equal to all instances ofJPropertyError
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:message
.message()
static JPropertyError
Construct a new immutableJPropertyError
instance.toString()
Prints the immutable valueJPropertyError
with attribute values.final JPropertyError
withMessage
(String value) Copy the current immutable object by setting a value for themessage
attribute.
-
Method Details
-
message
- Specified by:
message
in interfaceJPropertyParseMonadType.JPropertyErrorType
- Returns:
- The error message
-
withMessage
Copy the current immutable object by setting a value for themessage
attribute. 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
this
object
-
equals
This instance is equal to all instances ofJPropertyError
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:message
. -
toString
Prints the immutable valueJPropertyError
with attribute values. -
of
Construct a new immutableJPropertyError
instance.- Parameters:
message
- The value for themessage
attribute- Returns:
- An immutable JPropertyError instance
-
copyOf
Creates an immutable copy of aJPropertyParseMonadType.JPropertyErrorType
value. 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
-