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

io.permazen.index.Index Maven / Gradle / Ivy

There is a newer version: 5.1.0
Show newest version

/*
 * Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
 */

package io.permazen.index;

import io.permazen.tuple.Tuple;

import java.util.NavigableMap;
import java.util.NavigableSet;

/**
 * An index on a one or more fields in some target type.
 *
 * 

* Indexes are read-only and "live", always reflecting the current transaction state. * * @param index target type * @see io.permazen.index */ public interface Index { /** * Get the number of fields in this index. * * @return the number of indexed fields */ int numberOfFields(); /** * View this index as a {@link NavigableSet} of tuples. * * @return {@link NavigableSet} of tuples containing indexed value(s) and target value */ NavigableSet asSet(); /** * View this index as a {@link NavigableMap} of target values keyed by indexed value(s). * * @return {@link NavigableMap} from indexed value(s) to the corresponding set of target objects */ NavigableMap> asMap(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy