Package ancheta.tablaHash
Class ListaHash<K,V extends java.lang.Comparable<V>>
- java.lang.Object
-
- ancheta.tablaHash.ListaHash<K,V>
-
- All Implemented Interfaces:
IListaHash<K,V>
,java.io.Serializable
,java.lang.Iterable<V>
public class ListaHash<K,V extends java.lang.Comparable<V>> extends java.lang.Object implements IListaHash<K,V>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ListaHash()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
agregar(V elemento, K llave)
int
darCantidadDeElementos()
java.lang.Object[]
darCopiaEnArreglo()
NodoHash<K,V>
darPrimerNodo()
V
eliminar(K llave)
java.lang.Object[]
entregarCopiaOrdenada()
boolean
esVacia()
java.util.Iterator<V>
iterator()
boolean
vaciar()
-
-
-
Method Detail
-
agregar
public void agregar(V elemento, K llave) throws ElementoRepetidoException
- Specified by:
agregar
in interfaceIListaHash<K,V extends java.lang.Comparable<V>>
- Throws:
ElementoRepetidoException
-
eliminar
public V eliminar(K llave)
- Specified by:
eliminar
in interfaceIListaHash<K,V extends java.lang.Comparable<V>>
- Returns:
-
darCopiaEnArreglo
public java.lang.Object[] darCopiaEnArreglo()
- Specified by:
darCopiaEnArreglo
in interfaceIListaHash<K,V extends java.lang.Comparable<V>>
- Returns:
-
esVacia
public boolean esVacia()
- Specified by:
esVacia
in interfaceIListaHash<K,V extends java.lang.Comparable<V>>
- Returns:
-
vaciar
public boolean vaciar()
- Specified by:
vaciar
in interfaceIListaHash<K,V extends java.lang.Comparable<V>>
- Returns:
-
darCantidadDeElementos
public int darCantidadDeElementos()
- Specified by:
darCantidadDeElementos
in interfaceIListaHash<K,V extends java.lang.Comparable<V>>
- Returns:
-
entregarCopiaOrdenada
public java.lang.Object[] entregarCopiaOrdenada()
- Specified by:
entregarCopiaOrdenada
in interfaceIListaHash<K,V extends java.lang.Comparable<V>>
- Returns:
-
iterator
public java.util.Iterator<V> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<K>
-
darPrimerNodo
public NodoHash<K,V> darPrimerNodo()
- Specified by:
darPrimerNodo
in interfaceIListaHash<K,V extends java.lang.Comparable<V>>
- Returns:
-
-