Class DefaultComboBoxConfigurableLookUpModel.VectorUtilities

java.lang.Object
org.gvsig.gui.beans.comboboxconfigurablelookup.DefaultComboBoxConfigurableLookUpModel.VectorUtilities
Enclosing class:
DefaultComboBoxConfigurableLookUpModel

public class DefaultComboBoxConfigurableLookUpModel.VectorUtilities extends Object

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 Details

    • VectorUtilities

      public VectorUtilities()

      Creates a new instance of the class VectorUtilities.

  • Method Details

    • addAlphabeticallyOrdered

      public void addAlphabeticallyOrdered(Vector<Object> v, Object obj)

      Adds an item in alphabetical order.

      Parameters:
      v - java.util.Vector in alphabetical order.
      obj - java.lang.Object
    • addAlphabeticallyOrdered

      public void addAlphabeticallyOrdered(Vector<Object> v, Object obj, Comparator<Object> comp)

      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.Object
      comp - 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