Class DefaultComboBoxConfigurableLookUpModel.VectorUtilities
java.lang.Object
org.gvsig.gui.beans.comboboxconfigurablelookup.DefaultComboBoxConfigurableLookUpModel.VectorUtilities
- Enclosing class:
DefaultComboBoxConfigurableLookUpModel
New functionality to work with vectors (of elements).
This class is a copy of a class with the same name located in libIverUtiles.
- Author:
- Pablo Piqueras Bartolomé (p_queras@hotmail.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlphabeticallyOrdered(Vector<Object> v, Object obj) Adds an item in alphabetical order.voidaddAlphabeticallyOrdered(Vector<Object> v, Object obj, Comparator<Object> comp) Adds an item in alphabetic order using a comparator for compare the objects.doublelog2(double a) 2-base logarithm of aintlog2Integer(double a) 2-base logarithm of a, but the result doesn't have decimals (approximated to the integer number most near by below)
-
Constructor Details
-
VectorUtilities
public VectorUtilities()Creates a new instance of the class
VectorUtilities.
-
-
Method Details
-
addAlphabeticallyOrdered
Adds an item in alphabetical order.
- Parameters:
v- java.util.Vector in alphabetical order.obj- java.lang.Object
-
addAlphabeticallyOrdered
Adds an item in alphabetic order using a comparator for compare the objects. The objects must be alhabetically ordered.
- Parameters:
v- java.util.Vector in alphabetical order.obj- java.lang.Objectcomp- java.util.Comparator
-
log2
public double log2(double a) 2-base logarithm of a
- Parameters:
a- The value to do the calculations- Returns:
- Logarithm in 2 base of 'a'
-
log2Integer
public 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)
- Parameters:
a- The value to do the calculations- Returns:
- Logarithm in 2 base of 'a', as an integer
-