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
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic JPropertyWarning.Builderbuilder()Creates a builder forJPropertyWarning.static JPropertyWarningCreates an immutable copy of aJPropertyParseMonadType.JPropertyWarningTypevalue.booleanThis instance is equal to all instances ofJPropertyWarningthat have equal attribute values.inthashCode()Computes a hash code from attributes:message.message()static JPropertyWarningConstruct a new immutableJPropertyWarninginstance.toString()Prints the immutable valueJPropertyWarningwith attribute values.final JPropertyWarningwithMessage(String value) Copy the current immutable object by setting a value for themessageattribute.
-
Method Details
-
message
- Specified by:
messagein interfaceJPropertyParseMonadType.JPropertyWarningType- Returns:
- The warning 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 ofJPropertyWarningthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:message. -
toString
Prints the immutable valueJPropertyWarningwith attribute values. -
of
Construct a new immutableJPropertyWarninginstance.- Parameters:
message- The value for themessageattribute- Returns:
- An immutable JPropertyWarning instance
-
copyOf
Creates an immutable copy of aJPropertyParseMonadType.JPropertyWarningTypevalue. 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
-