Skip to content

Its a simple way to create lines, when you need to set variables in certain "index of the line", easy to use. Feel free to open issues and request a PR!!

Notifications You must be signed in to change notification settings

danilodeLuca/lineBuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A simple linebuilder.

Checkout tests to see how it works, its not difficult!!

Example:

  1. Simple line with 1 column and 4 lenght character
    String build = new LineBuilder(4)
                      .column("test").at(1, 4).value("test")
                      .build();

Result:

    Assert.assertEquals("test", build);
  1. Line with 2 columns and 9 lenght character
    String build = new LineBuilder(9)
                      .column("test").at(1, 4).value("test")
                      .column("test2").at(5, 9).value("test2")
                      .build();

Result:

  Assert.assertEquals("testtest2", build);
  1. Line with 1 columns and 4 lenght character and defined a complementer to left that will not be used
    String build = new LineBuilder(4)
                      .complementColumn(Complementer.onLeft("|"))
                      .column("test").at(1, 4).value("test")
                      .build();

Result:

  Assert.assertEquals("test", build);
  1. Line with 1 columns and 5 lenght character and defined a complementer to left that will be used
    String build = new LineBuilder(5)
                      .complementColumn(Complementer.onLeft("|"))
                      .column("test").at(1, 5).value("test")
                      .build();

Result:

    Assert.assertEquals("|test", build);
  1. Line with 1 columns and 5 lenght character and defined a complementer to right that will be used
    String build = new LineBuilder(5)
                      .complementColumn(Complementer.onRight("|"))
                      .column("test").at(1, 5).value("test")
                      .build();

Result:

    Assert.assertEquals("test|", build);

About

Its a simple way to create lines, when you need to set variables in certain "index of the line", easy to use. Feel free to open issues and request a PR!!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages