Here you can find the source of longToString(final long value)
Parameter | Description |
---|---|
value | a long value to be converted |
public static String longToString(final long value)
//package com.java2s; /*//from ww w . j a v a2 s.c o m * Copyright 2012 Igor Maznitsa (http://www.igormaznitsa.com) * * This file is part of the JVM to Z80 translator project (hereinafter referred to as J2Z80). * * J2Z80 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * J2Z80 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with J2Z80. If not, see <http://www.gnu.org/licenses/>. */ public class Main { /** * Convert a long into an ASM HEX representation * * @param value a long value to be converted * @return a hex string representation of the long */ public static String longToString(final long value) { final StringBuilder result = new StringBuilder(); result.append(value).append("(#").append(Long.toHexString(value).toUpperCase()).append(')'); return result.toString(); } }