
org.jsimpledb.index.Index Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsimpledb-util Show documentation
Show all versions of jsimpledb-util Show documentation
Common utility classes used by JSimpleDB.
/*
* Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
*/
package org.jsimpledb.index;
import java.util.NavigableMap;
import java.util.NavigableSet;
import org.jsimpledb.tuple.Tuple2;
/**
* An index on a single field.
*
*
* Indexes are read-only and "live", always reflecting the current transaction state.
*
*
* @param indexed value type
* @param index target type
* @see org.jsimpledb.index
*/
public interface Index {
/**
* View this index as a {@link NavigableSet} of tuples.
*
* @return {@link NavigableSet} of tuples containing indexed value and target value
*/
NavigableSet> asSet();
/**
* View this index as a {@link NavigableMap} of target values keyed by indexed value.
*
* @return {@link NavigableMap} from indexed value to the corresponding set of target objects
*/
NavigableMap> asMap();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy