java.lang.Object |
↳ |
com.pnfsoftware.jeb.util.primitives.Integers |
Class Overview
Utility methods for integer
.
Summary
Public Methods |
static
String
|
formatIntegerCollection(Collection<Integer> list, Integer radix, String pfx, String sfx)
|
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
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
Public Methods
public
static
String
formatIntegerCollection
(Collection<Integer> list, Integer radix, String pfx, String sfx)
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.
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)