Class SetBunch

  • All Implemented Interfaces:
    TripleBunch

    public class SetBunch
    extends java.lang.Object
    implements TripleBunch
    • Constructor Detail

    • 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
      • size

        public int size()
        Description copied from interface: TripleBunch
        Answer the number of triples in this bunch.
        Specified by:
        size in interface TripleBunch
      • 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 interface: TripleBunch
        Remove t from the triples in this bunch. If it wasn't a member, nothing happens. The bunch no longer .contains this triple.
        Specified by:
        remove in interface TripleBunch
      • 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