Class HashCommonSet<K>

java.lang.Object
org.apache.jena.mem2.collection.HashCommonBase<K>
org.apache.jena.mem2.collection.HashCommonSet<K>
All Implemented Interfaces:
JenaMapSetCommon<K>, JenaSet<K>
Direct Known Subclasses:
HashedTripleBunch

public abstract class HashCommonSet<K> extends HashCommonBase<K> implements JenaSet<K>
Implementation of JenaSet based on HashCommonBase.
  • Method Details

    • tryAdd

      public boolean tryAdd(K key)
      Description copied from interface: JenaSet
      Add the key to the set if it is not already present.
      Specified by:
      tryAdd in interface JenaSet<K>
      Parameters:
      key - the key to add
      Returns:
      true if the key was added, false if it was already present
    • addUnchecked

      public void addUnchecked(K key)
      Description copied from interface: JenaSet
      Add the key to the set without checking if it is already present. Attention: This method must only be used if it is guaranteed that the key is not already present.
      Specified by:
      addUnchecked in interface JenaSet<K>
      Parameters:
      key - the key to add