Skip to content

danielpine/boring-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TableBuilder

Display a list as table in console for debug something

Test

Console font Monospaced and size require be even number

Display Ansi

public class TableBuilderTest {
    @Test
    public void display() {
        TableBuilder.newBuilder()
                .enableAnsi()
                .enableAutoIndex()
                .setHeadBackground(Ansi.Color.CYAN)
                .setBodyBackgroundOdd(Ansi.Color.YELLOW)
                .setBodyBackgroundEven(Ansi.Color.WHITE)
                .display(data);
    }
}

Console

Display normal

public class TableBuilderTest {
    @Test
    public void display() {
        TableBuilder.newBuilder().display(
                Arrays.asList(
                        new User("小雨点", "Rain", "China"),
                        new User("Daniel Pine", "Pine", "中国")
                )
        );
    }
}

Console

Maven repos

<repository>
    <id>maven2</id>
    <url>http://repo1.maven.apache.org/maven2/</url>
    <releases>
        <enabled>true</enabled>
    </releases>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository> 
<repository>
    <id>sonatype</id>
    <url>https://s01.oss.sonatype.org/content/groups/public</url>
    <releases>
        <enabled>true</enabled>
    </releases>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository> 
<repository>
    <id>aliyun</id>
    <url>https://maven.aliyun.com/repository/central</url>
    <releases>
        <enabled>true</enabled>
    </releases>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository> 
<dependency>
    <groupId>io.github.danielpine</groupId>
    <artifactId>boring-tools</artifactId>
    <version>1.0.2-RELEASE</version>
</dependency>

About

Some ugly and useless tools

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages