Class OSHDBCombinedIndex<U extends Comparable<U> & Serializable,V extends Comparable<V> & Serializable>
java.lang.Object
org.heigit.ohsome.oshdb.api.generic.OSHDBCombinedIndex<U,V>
- Type Parameters:
U- the type of the fist part of the indexV- the type of the second part of the index
- All Implemented Interfaces:
Serializable,Comparable<OSHDBCombinedIndex<U,V>>
public class OSHDBCombinedIndex<U extends Comparable<U> & Serializable,V extends Comparable<V> & Serializable>
extends Object
implements Comparable<OSHDBCombinedIndex<U,V>>, Serializable
A data type for an index ("map key") consisting of two independent variables.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(@NotNull OSHDBCombinedIndex<U, V> other) booleaninthashCode()static <A,U extends Comparable<U> & Serializable, V extends Comparable<V> & Serializable>
SortedMap<U,SortedMap<V, A>> nest(Map<OSHDBCombinedIndex<U, V>, A> result) Helper function that converts the dual-index data structure returned by aggregation operations on this object to a nested Map structure, which can be easier to process further on.toString()
-
Constructor Details
-
OSHDBCombinedIndex
-
-
Method Details
-
getFirstIndex
-
getSecondIndex
-
compareTo
- Specified by:
compareToin interfaceComparable<U extends Comparable<U> & Serializable>
-
equals
-
hashCode
public int hashCode() -
toString
-
nest
public static <A,U extends Comparable<U> & Serializable, SortedMap<U,V extends Comparable<V> & Serializable> SortedMap<V, nestA>> (Map<OSHDBCombinedIndex<U, V>, A> result) Helper function that converts the dual-index data structure returned by aggregation operations on this object to a nested Map structure, which can be easier to process further on.This version creates a map for each <U> index value, containing maps containing results by timestamps.
- Type Parameters:
A- an arbitrary data type, used for the data value itemsU- an arbitrary data type, used for the index'es key itemsV- an arbitrary data type, used for the index'es key items- Parameters:
result- the "flat" result data structure that should be converted to a nested structure- Returns:
- a nested data structure: for each index part there is a separate level of nested maps
-