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

org.jsimpledb.index.Index2 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;
import org.jsimpledb.tuple.Tuple3;

/**
 * An index on two fields.
 *
 * 

* Indexes are read-only and "live", always reflecting the current transaction state. * * @param first indexed value type * @param second indexed value type * @param index target type * @see org.jsimpledb.index */ public interface Index2 { /** * View this index as a {@link NavigableSet} of tuples. * * @return {@link NavigableSet} of tuples containing indexed values and target value */ NavigableSet> asSet(); /** * View this index as a {@link NavigableMap} of target values keyed by indexed value tuples. * * @return {@link NavigableMap} from indexed value tuple to the corresponding set of target objects */ NavigableMap, NavigableSet> asMap(); /** * View this index as a {@link NavigableMap} of {@link Index}s keyed by the first value. * * @return {@link NavigableMap} from first value to {@link Index} */ NavigableMap> asMapOfIndex(); /** * Get the prefix of this instance that only includes the first two indexed fields. * * @return prefix of this index */ Index asIndex(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy