All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jsimpledb.index.Index Maven / Gradle / Ivy

There is a newer version: 3.6.1
Show newest version

/*
 * 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