public class

NumberFormatter

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.format.NumberFormatter

Class Overview

A number formatter, supporting formatting of immediates of variable sizes using different bases and other properties (e.g., signedness).

Notes:

  • maximum size: 64-bit
  • signedness: applicable to octal/decimal/hexadecimal bases only; N/A for binary or ascii formatting

Summary

Nested Classes
enum NumberFormatter.Base Rendering base. 
enum NumberFormatter.NotationType Notation type for hexadecimal bases. 
Public Constructors
NumberFormatter()
NumberFormatter(NumberFormatter defaultNumberFormatter)
Public Methods
String format(int bitsize, long rawValue, NumberFormatter.Base base, boolean treatAsSignedNumber)
String format(int bitsize, long rawValue)
Format a number using the formatter's current settings.
NumberFormatter.Base getBase()
NumberFormatter.NotationType getNotationType()
boolean isSignedNumber()
NumberFormatter.Base rotateBase()
void setBase(NumberFormatter.Base base)
void setNotationType(NumberFormatter.NotationType notationType)
void setSignedNumber(boolean signedNumber)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public NumberFormatter ()

public NumberFormatter (NumberFormatter defaultNumberFormatter)

Public Methods

public String format (int bitsize, long rawValue, NumberFormatter.Base base, boolean treatAsSignedNumber)

public String format (int bitsize, long rawValue)

Format a number using the formatter's current settings.

public NumberFormatter.Base getBase ()

public NumberFormatter.NotationType getNotationType ()

public boolean isSignedNumber ()

public NumberFormatter.Base rotateBase ()

public void setBase (NumberFormatter.Base base)

public void setNotationType (NumberFormatter.NotationType notationType)

public void setSignedNumber (boolean signedNumber)