Class BitSetMapper

java.lang.Object
org.apache.jena.sparql.engine.join.BitSetMapper

public class BitSetMapper extends Object
Methods for converting collections to and from a bit set representation w.r.t. a list of reference items.

For example, if the list of reference items is [ ?x ?y ?z ] and the given items is the set { ?y ?z } then the resulting bit set has the value 011.

  • Constructor Details

    • BitSetMapper

      public BitSetMapper()
  • Method Details

    • toBitSet

      public static BitSet toBitSet(List<Var> referenceList, Binding binding)
      Create a bit set from the binding's key set.
      Implementation Note:
      This method relies on List.indexOf(Object). The class ImmutableUniqueList provides an index for these lookups.
    • toList

      public static <T> List<T> toList(List<T> referenceList, BitSet key)
      Map the positions of all set bits to items in the list.