Package org.ojalgo.type.keyvalue
Class EntrySet<K,V>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<java.util.Map.Entry<K,V>>
-
- org.ojalgo.type.keyvalue.EntrySet<K,V>
-
- All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<K,V>>
,java.util.Collection<java.util.Map.Entry<K,V>>
,java.util.List<java.util.Map.Entry<K,V>>
,java.util.Set<java.util.Map.Entry<K,V>>
,EntryList<K,V>
,Paired<K,V>
- Direct Known Subclasses:
EntrySet.KeyedPrimitives
,EntrySet.ObjectObject
public abstract class EntrySet<K,V> extends java.util.AbstractList<java.util.Map.Entry<K,V>> implements EntryList<K,V>, java.util.Set<java.util.Map.Entry<K,V>>
Allows you to wrap and treat two arrays as aCollection
of key-value pairs. Implements bothList
andSet
but does not in any way test or enforce uniqueness – that's up to the user of this class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
EntrySet.EntryView<K,V>
(package private) static class
EntrySet.KeyedPrimitives<K>
(package private) static class
EntrySet.ObjectByte<K>
(package private) static class
EntrySet.ObjectDouble<K>
(package private) static class
EntrySet.ObjectFloat<K>
(package private) static class
EntrySet.ObjectInt<K>
(package private) static class
EntrySet.ObjectLong<K>
(package private) static class
EntrySet.ObjectObject<K,V>
(package private) static class
EntrySet.ObjectShort<K>
(package private) static class
EntrySet.ViewingIterator<K,V>
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract EntryPair<K,V>
get(int index)
K
getKey(int index)
EntryPair<K,V>
getPair(int index)
abstract V
getValue(int index)
java.util.Iterator<java.util.Map.Entry<K,V>>
iterator()
abstract void
setValue(int index, V value)
int
size()
java.util.Spliterator<java.util.Map.Entry<K,V>>
spliterator()
-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
myKeys
private final K[] myKeys
-
-
Constructor Detail
-
EntrySet
EntrySet(K[] keys)
-
-
Method Detail
-
iterator
public final java.util.Iterator<java.util.Map.Entry<K,V>> iterator()
- Specified by:
iterator
in interfacejava.util.Collection<K>
- Specified by:
iterator
in interfacejava.lang.Iterable<K>
- Specified by:
iterator
in interfacejava.util.List<K>
- Specified by:
iterator
in interfacejava.util.Set<K>
- Overrides:
iterator
in classjava.util.AbstractList<java.util.Map.Entry<K,V>>
-
setValue
public abstract void setValue(int index, V value)
-
size
public final int size()
-
-