Skip to content

bogdanpc/texty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text builder using Java Fluent API

Java project

Implement a text builder with lines, labels to explore Fluent APIs

How to use it

    Texty
        .newBuilder()
        .line("My list").endLine()
        .newLine()
        .line(List.of("red", "blue", "orange")).label("Cities").endsWith(LineBuilder.SEMI_COLON).endLine()
        .build();

Text result

Hello,

Colors: red, blue, orange;

Line with label (always at start of line. Ends with a colon : and space. i.e. Location: )

Texty.newBuilder().line("My home town").label("Location").endLine().build();

Text result

Location: My home town

Use endsWith(...) to add a punctuation on end of the line Add a semi-colon to end of line

Texty.newBuilder().line("My home town").label("Location").endsWith(';').endLine().build();
Texty.newBuilder().line("My home town").label("Location").endsWith(LineBuilder.SEMI_COLON).endLine().build();
Location: My home town;

Continuous testing

Quarkus supports continuous testing To use it on a non Quarkus project, I created a maven profile test. See this blog post https://blog.sebastian-daschner.com/entries/quarkus-dev-for-java-projects

To run it

mvn quarkus:dev -Ptest

About

Text builder using Java Fluent API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages