Class HashedTripleBunch

    • Constructor Detail

      • HashedTripleBunch

        public HashedTripleBunch​(TripleBunch b)
    • Method Detail

      • contains

        public boolean contains​(Triple t)
        Description copied from interface: TripleBunch
        Answer true iff this TripleBunch contains a triple .equals to t.
        Specified by:
        contains in interface TripleBunch
      • containsBySameValueAs

        public boolean containsBySameValueAs​(Triple t)
        Description copied from interface: TripleBunch
        Answer true iff this TripleBunch contains a triple with .sameValueAs subject, predicate, and object. (Typically this only matters for the object. For example, integer literals with different numbers of leading zeroes can be .sameValueAs but not .equals).
        Specified by:
        containsBySameValueAs in interface TripleBunch
      • currentCapacity

        public int currentCapacity()
        Answer the current capacity of this HashedTripleBunch; for testing purposes only. [Note that the bunch is resized when it is more than half-occupied.]
      • add

        public void add​(Triple t)
        Description copied from interface: TripleBunch
        Add t to the triples in this bunch. If t is already a member, nothing happens. The bunch now .contains this triple.
        Specified by:
        add in interface TripleBunch
      • remove

        public void remove​(Triple t)
        Description copied from class: HashCommon
        Remove the object key from this hash's keys if it is present (if it's absent, do nothing). If a key is removed, the removeAssociatedValues will be invoked. If a key is moved, the moveAssociatedValues method will be called.
        Specified by:
        remove in interface TripleBunch
        Overrides:
        remove in class HashCommon<Triple>
      • iterator

        public ExtendedIterator<Triple> iterator()
        Description copied from interface: TripleBunch
        Answer an iterator over all the triples in this bunch. It is unwise to .remove from this iterator. (It may become illegal.)
        Specified by:
        iterator in interface TripleBunch