- java.lang.Object
-
- life.expert.value.string.SolidString
-
- All Implemented Interfaces:
java.lang.Comparable<SolidString>
public final class SolidString extends java.lang.Object implements java.lang.Comparable<SolidString>
Simple immutable String holder class Class invariant: non blank and stripped String - pattern new-call - not for inheritance - only the monoOf.. factory methods is allowed, because it allows you to lazily create objects only with a real subscription - 'of' - factory method is prohibited because it is intended only for easy creation of objects in tests, please use pure functional methods monoOf.., without raise exceptions.var s=SolidString.tryOf( goodString );******
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSolidString.SolidStringBuilderThe type Non blank string builder.
-
Constructor Summary
Constructors Constructor Description SolidString()
-
Method Summary
Modifier and Type Method Description static SolidString.SolidStringBuilderbuilder()Builder non blank string builder.intcompareTo(SolidString o)static reactor.core.publisher.Mono<SolidString>copyOf(SolidString other)Standard Copy Factorystatic reactor.core.publisher.Mono<SolidString>monoOf(java.lang.String string)Create SolidString from String Only the monoOf..static reactor.core.publisher.Mono<SolidString>monoOfMono(reactor.core.publisher.Mono<java.lang.String> string)Create SolidString from Mono with String inside The method helps chaining flows togetherstatic reactor.core.publisher.Mono<SolidString>monoOfMonoWithTuple(reactor.core.publisher.Mono<io.vavr.Tuple1<java.lang.String>> tuple)Create SolidString from Mono with Tuple inside The method helps chaining flows togetherstatic reactor.core.publisher.Mono<SolidString>monoOfTuple(io.vavr.Tuple1<java.lang.String> tuple)Create SolidString from Tuple The method helps with conversion operations Tuple->SolidStringstatic SolidStringof(java.lang.String string)Deprecated.please use pure functional methods monoOf.., without raise exceptions.static io.vavr.Tuple1<java.lang.String>SolidString(SolidString object)pattern matching in vavr - you need add static import to method with pattern matching import static life.expert.value.string.NonBlankStringPatterns.*;SolidString.SolidStringBuildertoBuilder()To builder non blank string builder.java.lang.StringtoString()
-
-
-
Method Detail
-
monoOf
public static reactor.core.publisher.Mono<SolidString> monoOf(java.lang.String string)
Create SolidString from String Only the monoOf.. factory methods is allowed, because it allows you to lazily create objects only with a real subscription- Parameters:
string- the string- Returns:
- the Mono with lazyli created object
- Implementation Note:
- to create objects, this method calls the private factory monoOf_
-
of
@Deprecated public static SolidString of(java.lang.String string)
Deprecated.please use pure functional methods monoOf.., without raise exceptions.Classic fabric method for creating non blank string. This factory method is prohibited because it is intended only for easy creation of objects in tests
- Parameters:
string- the string- Returns:
- the non blank string
- Throws:
java.lang.IllegalArgumentException- if string non blank or nullable
-
monoOfTuple
public static reactor.core.publisher.Mono<SolidString> monoOfTuple(io.vavr.Tuple1<java.lang.String> tuple)
Create SolidString from Tuple The method helps with conversion operations Tuple->SolidString- Parameters:
tuple- the tuple- Returns:
- the Mono with lazyli created object
-
monoOfMonoWithTuple
public static reactor.core.publisher.Mono<SolidString> monoOfMonoWithTuple(reactor.core.publisher.Mono<io.vavr.Tuple1<java.lang.String>> tuple)
Create SolidString from Mono with Tuple inside The method helps chaining flows together- Parameters:
tuple- the tuple- Returns:
- the Mono with lazyli created object
-
monoOfMono
public static reactor.core.publisher.Mono<SolidString> monoOfMono(reactor.core.publisher.Mono<java.lang.String> string)
Create SolidString from Mono with String inside The method helps chaining flows together- Parameters:
string- the string- Returns:
- the Mono with lazyli created object
-
copyOf
public static reactor.core.publisher.Mono<SolidString> copyOf(SolidString other)
Standard Copy Factory- Parameters:
other- the other- Returns:
- the Mono with lazyli created object
- Implementation Note:
- to create objects, this method calls the private factory monoOf_
-
compareTo
public int compareTo(SolidString o)
- Specified by:
compareToin interfacejava.lang.Comparable<SolidString>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
SolidString
public static io.vavr.Tuple1<java.lang.String> SolidString(SolidString object)
pattern matching in vavr - you need add static import to method with pattern matching import static life.expert.value.string.NonBlankStringPatterns.*;- Parameters:
object- the object- Returns:
- the tuple 1
-
builder
public static SolidString.SolidStringBuilder builder()
Builder non blank string builder.- Returns:
- the non blank string builder
-
toBuilder
public SolidString.SolidStringBuilder toBuilder()
To builder non blank string builder.- Returns:
- the non blank string builder
-
-