Interface FastTripleBunch

All Superinterfaces:
org.apache.jena.atlas.lib.Copyable<FastTripleBunch>, JenaMapSetCommon<Triple>, JenaSet<Triple>, JenaSetHashOptimized<Triple>
All Known Implementing Classes:
FastArrayBunch, FastHashedTripleBunch

public interface FastTripleBunch extends JenaSetHashOptimized<Triple>, org.apache.jena.atlas.lib.Copyable<FastTripleBunch>
A bunch of triples - a stripped-down set with specialized methods. A bunch is expected to store triples that share some useful property (such as having the same subject or predicate).
  • Method Details

    • isArray

      boolean isArray()
      Answer true iff this bunch is implemented as an array. This field is used to optimize some operations by avoiding the need for instanceOf tests.
      true iff this bunch is implemented as an arrays
    • anyMatchRandomOrder

      boolean anyMatchRandomOrder(Predicate<Triple> predicate)
      This method is used to optimize _PO match operations. The JenaMapSetCommon.anyMatch(Predicate) method is faster if there are only a few matches. This method is faster if there are many matches and the set is ordered in an unfavorable way. _PO matches usually fall into this category.
      predicate - the predicate to match
      true if any triple in the bunch matches the predicate