public class

Integers

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.primitives.Integers

Class Overview

Utility methods for integer.

Summary

Public Constructors
Integers()
Public Methods
static String formatHexIntegerCollection(Collection<Integer> list)
Format a collection of ints.
static String formatIntegerCollection(Collection<Integer> collection, Integer radix, String pfx, String sfx)
<<<<<<< HEAD Format a collection of ints.
static String formatIntegerCollection(Collection<Integer> collection, Integer radix, String pfx, String sfx, String separator)
static Integer max(Collection<Integer> c)
static Integer min(Collection<Integer> c)
static int safeInt(Integer v)
Safe unbox an Integer to zero when null.
static Integer safeInt(Integer v, int defaultValue)
Safe unbox an Integer to defaultValue when null.
static String toUnsignedString(int value)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Integers ()

Public Methods

public static String formatHexIntegerCollection (Collection<Integer> list)

Format a collection of ints.

public static String formatIntegerCollection (Collection<Integer> collection, Integer radix, String pfx, String sfx)

<<<<<<< HEAD Format a collection of ints.

public static String formatIntegerCollection (Collection<Integer> collection, Integer radix, String pfx, String sfx, String separator)

Parameters
radix optional, default=10
pfx optional, default=none
sfx optional, default=none

public static Integer max (Collection<Integer> c)

public static Integer min (Collection<Integer> c)

public static int safeInt (Integer v)

Safe unbox an Integer to zero when null.

Parameters
v an Integer object
Returns
  • the integer value, 0 if null

public static Integer safeInt (Integer v, int defaultValue)

Safe unbox an Integer to defaultValue when null.

Parameters
v an Integer object
defaultValue default value if null
Returns
  • the integer value, defaultValue if null

public static String toUnsignedString (int value)