LoginSignup
0
3

More than 1 year has passed since last update.

例えば、ログに、List を

println(list)

このように表示されているのが、

I/System.out: [Item(exchange=quoine, pair=bchjpy, price=127989.3), Item(exchange=bitflyer, pair=btcfxjpy, price=1073351.0), Item(exchange=kraken, pair=btcjpy, price=1046576.0), Item(exchange=bitflyer, pair=btcjpy, price=1038000.0), Item(exchange=quoine, pair=btcjpy, price=1035870.94), Item(exchange=kraken, pair=ethjpy, price=91402.0), Item(exchange=quoine, pair=ethjpy, price=90595.82), Item(exchange=kraken, pair=xrpjpy, price=109.815), Item(exchange=kraken, pair=zecjpy, price=41855.0)]

こう書くだけで、

println(FlipTableConverters.fromIterable(list, Item::class.java))

こんなテキストで表で整形されて表示されます。

I/System.out: ╔══════════╤══════════╤════════════╗
I/System.out: ║ Exchange │ Pair     │ Price      ║
I/System.out: ╠══════════╪══════════╪════════════╣
I/System.out: ║ quoine   │ bchjpy   │ 127989.3   ║
I/System.out: ╟──────────┼──────────┼────────────╢
I/System.out: ║ bitflyer │ btcfxjpy │ 1073351.0  ║
I/System.out: ╟──────────┼──────────┼────────────╢
I/System.out: ║ kraken   │ btcjpy   │ 1046576.0  ║
I/System.out: ╟──────────┼──────────┼────────────╢
I/System.out: ║ bitflyer │ btcjpy   │ 1038000.0  ║
I/System.out: ╟──────────┼──────────┼────────────╢
I/System.out: ║ quoine   │ btcjpy   │ 1035870.94 ║
I/System.out: ╟──────────┼──────────┼────────────╢
I/System.out: ║ kraken   │ ethjpy   │ 91402.0    ║
I/System.out: ╟──────────┼──────────┼────────────╢
I/System.out: ║ quoine   │ ethjpy   │ 90595.82   ║
I/System.out: ╟──────────┼──────────┼────────────╢
I/System.out: ║ kraken   │ xrpjpy   │ 109.815    ║
I/System.out: ╟──────────┼──────────┼────────────╢
I/System.out: ║ kraken   │ zecjpy   │ 41855.0    ║
I/System.out: ╚══════════╧══════════╧════════════╝

ぜひ、お試しあれ。

👉 Flip Tables で List を見やすくログに表示する

0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3