Package com.io7m.jproperties.monad
Class JPropertyWarning
java.lang.Object
com.io7m.jproperties.monad.JPropertyWarning
- All Implemented Interfaces:
JPropertyParseMonadType.JPropertyWarningType
public final class JPropertyWarning
extends Object
implements JPropertyParseMonadType.JPropertyWarningType
The type of parse warnings.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic JPropertyWarning.Builder
builder()
Creates a builder forJPropertyWarning
.static JPropertyWarning
Creates an immutable copy of aJPropertyParseMonadType.JPropertyWarningType
value.boolean
This instance is equal to all instances ofJPropertyWarning
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:message
.message()
static JPropertyWarning
Construct a new immutableJPropertyWarning
instance.toString()
Prints the immutable valueJPropertyWarning
with attribute values.final JPropertyWarning
withMessage
(String value) Copy the current immutable object by setting a value for themessage
attribute.
-
Method Details
-
message
- Specified by:
message
in interfaceJPropertyParseMonadType.JPropertyWarningType
- Returns:
- The warning 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 ofJPropertyWarning
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:message
. -
toString
Prints the immutable valueJPropertyWarning
with attribute values. -
of
Construct a new immutableJPropertyWarning
instance.- Parameters:
message
- The value for themessage
attribute- Returns:
- An immutable JPropertyWarning instance
-
copyOf
Creates an immutable copy of aJPropertyParseMonadType.JPropertyWarningType
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 JPropertyWarning instance
-
builder
Creates a builder forJPropertyWarning
.- Returns:
- A new JPropertyWarning builder
-