Package de.intarsys.tools.number
Class NumberInstance
java.lang.Object
de.intarsys.tools.number.NumberWrapper
de.intarsys.tools.number.NumberInstance
- All Implemented Interfaces:
Iterable
,Collection
,Set
An implementation of NumberWrapper that represents a single number object.
-
Constructor Summary
ConstructorsConstructorDescriptionNumberInstance
(double i) NumberInstance constructor for double.NumberInstance
(int i) NumberInstance constructor for int.NumberInstance
(Number number) NumberInstance constructor forNumber
.NumberInstance
(String numberValueInString) NumberInstance constructor for integer value formatted in a String. -
Method Summary
Methods inherited from class de.intarsys.tools.number.NumberWrapper
clear, containsAll, getFirst, remove, removeAll, retainAll, toArray
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.Set
equals, hashCode, spliterator
-
Constructor Details
-
NumberInstance
public NumberInstance(double i) NumberInstance constructor for double.- Parameters:
i
- A primitive double to be wrapped
-
NumberInstance
public NumberInstance(int i) NumberInstance constructor for int.- Parameters:
i
- A primitive int tobe wrapped
-
NumberInstance
NumberInstance constructor forNumber
.- Parameters:
number
- ANumber
instance to be wrapped
-
NumberInstance
NumberInstance constructor for integer value formatted in a String.- Parameters:
numberValueInString
- The string containing the integer value.
-
-
Method Details
-
getN
-
iterator
-
toString
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
toArray
-
add
-
addAll
-
getMin
protected double getMin()- Specified by:
getMin
in classNumberWrapper
-
getMax
protected double getMax()- Specified by:
getMax
in classNumberWrapper
-
increment
public void increment(int i) - Specified by:
increment
in classNumberWrapper
-