Record Class MultilineString
java.lang.Object
java.lang.Record
net.flectone.pulse.model.value.MultilineString
- Record Components:
lines- the lines, in the order they were written
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MultilineStringThe empty valuestatic final StringWhat the lines are joined with by default. -
Constructor Summary
ConstructorsConstructorDescriptionMultilineString(List<String> lines) Creates an instance of aMultilineStringrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static MultilineStringReads a value from its config representation, accepting both a single line and a list of them.final inthashCode()Returns a hash code value for this object.The lines joined with something else.lines()Returns the value of thelinesrecord component.static MultilineStringWraps a single line.toJson()Writes this value back to its config representation.@NonNull StringtoString()Returns a string representation of this record class.value()The lines joined withSEPARATOR.
-
Field Details
-
SEPARATOR
-
EMPTY
The empty value
-
-
Constructor Details
-
MultilineString
-
-
Method Details
-
of
Wraps a single line.- Parameters:
value- the text- Returns:
- the value
-
fromJson
Reads a value from its config representation, accepting both a single line and a list of them.- Parameters:
object- the raw config value- Returns:
- the parsed value
-
value
-
join
-
toJson
Writes this value back to its config representation. List stays a list, single line stays a single line.- Returns:
- the config value
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
lines
-