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

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

The 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;
import org.jsimpledb.tuple.Tuple4;
import org.jsimpledb.tuple.Tuple5;

/**
 * An index on a four fields.
 *
 * 

* Indexes are read-only and "live", always reflecting the current transaction state. * * @param first indexed value type * @param second indexed value type * @param third indexed value type * @param fourth indexed value type * @param index target type * @see org.jsimpledb.index */ public interface Index4 { /** * 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 three values. * * @return {@link NavigableMap} from first three values to {@link Index} */ NavigableMap, Index> asMapOfIndex(); /** * View this index as a {@link NavigableMap} of {@link Index2}s keyed by the first two values. * * @return {@link NavigableMap} from first two values to {@link Index2} */ NavigableMap, Index2> asMapOfIndex2(); /** * View this index as a {@link NavigableMap} of {@link Index3}s keyed by the first value. * * @return {@link NavigableMap} from first value to {@link Index3} */ NavigableMap> asMapOfIndex3(); /** * Get the prefix of this instance that only includes the first four indexed fields. * * @return prefix of this index */ Index3 asIndex3(); /** * Get the prefix of this instance that only includes the first three indexed fields. * * @return prefix of this index */ Index2 asIndex2(); /** * 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