Here you can find the source of formatLong(long value)
Parameter | Description |
---|---|
value | - long value |
public static String formatLong(long value)
//package com.java2s; public class Main { /**//from www . j av a 2 s . com * Formats a long value and prepends it with a - or + * This functions is used for showing the diff values for test runs * @param value - long value * @return */ public static String formatLong(long value) { if (value == 0) { return "0"; } else if (value < 0) { return Long.toString(value); } else { // if (a < b) return "+" + Long.toString(value); } } }