Interface FunctionalMap.ReadOnlyMap<K,​V>

  • All Superinterfaces:
    AutoCloseable, FunctionalMap<K,​V>
    Enclosing interface:
    FunctionalMap<K,​V>

    @Experimental
    public static interface FunctionalMap.ReadOnlyMap<K,​V>
    extends FunctionalMap<K,​V>
    Exposes read-only operations that can be executed against the functional map. The information that can be read per entry in the functional map is exposed by EntryView.ReadEntryView.

    Read-only operations have the advantage that no locks are acquired for the duration of the operation and so it makes sense to have them a top-level interface dedicated to them.

    Browsing methods that provide a read-only view of the cached data are available via keys() and entries(). Having keys() makes sense since that way keys can be traversed without having to bring values. Having entries() makes sense since it allows traversing both keys, values and any meta parameters associated with them, but this is no extra cost to exposing just values since keys are the main index and hence will always be available. Hence, adding a method to only browse values offers nothing extra to the API.

    Since:
    8.0