public class DefaultComboBoxConfigurableLookUpModel.VectorUtilities
extends java.lang.Object
New functionality to work with vectors (of elements).
This class is a copy of a class with the same name located in libIverUtiles.
| Constructor and Description |
|---|
VectorUtilities()
Creates a new instance of the class
VectorUtilities. |
| Modifier and Type | Method and Description |
|---|---|
void |
addAlphabeticallyOrdered(java.util.Vector<java.lang.Object> v,
java.lang.Object obj)
Adds an item in alphabetical order.
|
void |
addAlphabeticallyOrdered(java.util.Vector<java.lang.Object> v,
java.lang.Object obj,
java.util.Comparator<java.lang.Object> comp)
Adds an item in alphabetic order using a comparator for compare the objects.
|
double |
log2(double a)
2-base logarithm of a
|
int |
log2Integer(double a)
2-base logarithm of a, but the result doesn't have decimals (approximated to the integer number most near by below)
|
public VectorUtilities()
Creates a new instance of the class VectorUtilities.
public void addAlphabeticallyOrdered(java.util.Vector<java.lang.Object> v,
java.lang.Object obj)
Adds an item in alphabetical order.
v - java.util.Vector in alphabetical order.obj - java.lang.Objectpublic void addAlphabeticallyOrdered(java.util.Vector<java.lang.Object> v,
java.lang.Object obj,
java.util.Comparator<java.lang.Object> comp)
Adds an item in alphabetic order using a comparator for compare the objects. The objects must be alhabetically ordered.
v - java.util.Vector in alphabetical order.obj - java.lang.Objectcomp - java.util.Comparatorpublic double log2(double a)
2-base logarithm of a
a - The value to do the calculationspublic int log2Integer(double a)
2-base logarithm of a, but the result doesn't have decimals (approximated to the integer number most near by below)
a - The value to do the calculations