Interface JenaMapSetCommon<E>

Type Parameters:
E - the type of the keys/elements in the collection
All Known Subinterfaces:
FastTripleBunch, JenaMap<K,V>, JenaSet<E>, JenaSetHashOptimized<E>, NodeToTriplesMap, TripleBunch
All Known Implementing Classes:
ArrayBunch, FastArrayBunch, FastHashBase, FastHashedBunchMap, FastHashedTripleBunch, FastHashMap, FastHashSet, HashCommonMap, HashCommonSet, HashedBunchMap, HashedTripleBunch, NodeToTriplesMapMem

public interface JenaMapSetCommon<E>
Common interface for JenaMap and JenaSet. *
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    anyMatch(Predicate<E> predicate)
    Check whether the collection contains any element matching the predicate.
    void
    Clear the collection.
    boolean
    Check whether the collection contains a given key.
    boolean
     
    Get an iterator over the keys in the collection.
    Get a spliterator over the keys in the collection.
    default Stream<E>
    Get a stream over the keys in the collection.
    default Stream<E>
    Get a parallel stream over the keys in the collection.
    void
    Removes a key from the collection.
    int
     
    boolean
    tryRemove(E key)
    Tries to remove a key from the collection.
  • Method Details

    • clear

      void clear()
      Clear the collection.
    • size

      int size()
      Returns:
      the number of elements in the collection
    • isEmpty

      boolean isEmpty()
      Returns:
      true if the collection is empty
    • containsKey

      boolean containsKey(E key)
      Check whether the collection contains a given key.
      Parameters:
      key - the key to look for
      Returns:
      true if the collection contains the key
    • anyMatch

      boolean anyMatch(Predicate<E> predicate)
      Check whether the collection contains any element matching the predicate.
      Parameters:
      predicate - the predicate to match
      Returns:
      true if the collection contains any element matching the predicate
    • tryRemove

      boolean tryRemove(E key)
      Tries to remove a key from the collection.
      Parameters:
      key - the key to remove
      Returns:
      true if the key was removed. If the key was not present, false is returned.
    • removeUnchecked

      void removeUnchecked(E key)
      Removes a key from the collection. Attention: Implementations may assume that the key is present.
      Parameters:
      key - the key to remove
    • keyIterator

      ExtendedIterator<E> keyIterator()
      Get an iterator over the keys in the collection.
      Returns:
      an iterator over the keys in the collection
    • keySpliterator

      Spliterator<E> keySpliterator()
      Get a spliterator over the keys in the collection.
      Returns:
      a spliterator over the keys in the collection
    • keyStream

      default Stream<E> keyStream()
      Get a stream over the keys in the collection.
      Returns:
      a stream over the keys in the collection
    • keyStreamParallel

      default Stream<E> keyStreamParallel()
      Get a parallel stream over the keys in the collection.
      Returns:
      a parallel stream over the keys in the collection