- 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 aCollectionof key-value pairs. Implements bothListandSetbut 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 classEntrySet.EntryView<K,V>(package private) static classEntrySet.KeyedPrimitives<K>(package private) static classEntrySet.ObjectByte<K>(package private) static classEntrySet.ObjectDouble<K>(package private) static classEntrySet.ObjectFloat<K>(package private) static classEntrySet.ObjectInt<K>(package private) static classEntrySet.ObjectLong<K>(package private) static classEntrySet.ObjectObject<K,V>(package private) static classEntrySet.ObjectShort<K>(package private) static classEntrySet.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)KgetKey(int index)EntryPair<K,V>getPair(int index)abstract VgetValue(int index)java.util.Iterator<java.util.Map.Entry<K,V>>iterator()abstract voidsetValue(int index, V value)intsize()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:
iteratorin interfacejava.util.Collection<K>- Specified by:
iteratorin interfacejava.lang.Iterable<K>- Specified by:
iteratorin interfacejava.util.List<K>- Specified by:
iteratorin interfacejava.util.Set<K>- Overrides:
iteratorin classjava.util.AbstractList<java.util.Map.Entry<K,V>>
-
setValue
public abstract void setValue(int index, V value)
-
size
public final int size()
-
-