unbbayes.util
Class FloatCollection

java.lang.Object
  extended by unbbayes.util.FloatCollection
All Implemented Interfaces:
Serializable

public final class FloatCollection
extends Object
implements Serializable

Classe que representa um array dinÔøΩmico do tipo float.

Author:
Michael, Rommel
See Also:
Serialized Form

Field Summary
 float[] data
           
static int DEFAULT_SIZE
           
 int size
           
 
Constructor Summary
FloatCollection()
           
FloatCollection(int initialCapacity)
           
 
Method Summary
 boolean add(float newElement)
          Appends the specified element to the end of this list.
 void add(int index, float element)
          Inserts the specified element at the specified position in this list.
 void ensureCapacity(int minCapacity)
          Increases the capacity of this floatCollection instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.
 float get(int index)
          Returns the element at the specified position in this list.
 void remove(int index)
          Removes the element at the specified position in this list.
 float set(int index, float element)
          Replaces the element at the specified position in this list with the specified element.
 int size()
          Returns the number of elements in this list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SIZE

public static final int DEFAULT_SIZE
See Also:
Constant Field Values

data

public float[] data

size

public int size
Constructor Detail

FloatCollection

public FloatCollection(int initialCapacity)

FloatCollection

public FloatCollection()
Method Detail

ensureCapacity

public final void ensureCapacity(int minCapacity)
Increases the capacity of this floatCollection instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.

Parameters:
minCapacity - the desired minimum capacity.

size

public final int size()
Returns the number of elements in this list.

Returns:
the number of elements in this list.

get

public final float get(int index)
Returns the element at the specified position in this list.

Parameters:
index - index of element to return.
Returns:
the element at the specified position in this list.

set

public final float set(int index,
                       float element)
Replaces the element at the specified position in this list with the specified element.

Parameters:
index - index of element to replace.
element - element to be stored at the specified position.
Returns:
the element previously at the specified position.

add

public final boolean add(float newElement)
Appends the specified element to the end of this list.

Parameters:
o - element to be appended to this list.
Returns:
true

add

public final void add(int index,
                      float element)
Inserts the specified element at the specified position in this list. Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

Parameters:
index - index at which the specified element is to be inserted.
element - element to be inserted.
Throws:
IndexOutOfBoundsException - if index is out of range (index < 0 || index > size()).

remove

public final void remove(int index)
Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices).

Parameters:
index - the index of the element to removed.


Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.