Package rasj.odmg

Class RasSet

  • All Implemented Interfaces:
    java.lang.Iterable, java.util.Collection, java.util.Set, DCollection, DSet

    public class RasSet
    extends RasCollection
    implements DSet
    This class implements the ODMG DSet interface.
    • Constructor Summary

      Constructors 
      Constructor Description
      RasSet()
      constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(java.lang.Object element)
      Appends the specified element to this Bag.
      void clear()
      Removes all of the elements from this set.
      boolean contains​(java.lang.Object o)
      Returns true if this set contains the specified element.
      DSet difference​(DSet otherSet)
      Not implemented yet.
      DSet intersection​(DSet otherSet)
      Not implemented yet.
      boolean isEmpty()
      Returns true if this set contains no elements.
      java.util.Iterator iterator()
      Returns an iterator over the elements in this Set in proper sequence.
      boolean properSubsetOf​(DSet otherSet)
      Not implemented yet.
      boolean properSupersetOf​(DSet otherSet)
      Not implemented yet.
      boolean remove​(java.lang.Object o)
      Removes the given element from this set if it is present.
      int size()
      Returns the number of elements in this Set.
      boolean subsetOf​(DSet otherSet)
      Not implemented yet.
      boolean supersetOf​(DSet otherSet)
      Not implemented yet.
      DSet union​(DSet otherSet)
      Not implemented yet.
      • Methods inherited from class java.util.AbstractCollection

        addAll, containsAll, removeAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.Set

        addAll, containsAll, equals, hashCode, removeAll, retainAll, spliterator, toArray, toArray
    • Constructor Detail

      • RasSet

        public RasSet()
        constructor
    • Method Detail

      • iterator

        public java.util.Iterator iterator()
        Returns an iterator over the elements in this Set in proper sequence.
        Specified by:
        iterator in interface java.util.Collection
        Specified by:
        iterator in interface java.lang.Iterable
        Specified by:
        iterator in interface java.util.Set
        Overrides:
        iterator in class RasCollection
      • difference

        public DSet difference​(DSet otherSet)
        Not implemented yet.
        Specified by:
        difference in interface DSet
        Parameters:
        otherSet - A set containing elements that should not be in the result set.
        Returns:
        A newly created DSet instance that contains the elements of this set minus those elements in otherSet.
      • intersection

        public DSet intersection​(DSet otherSet)
        Not implemented yet.
        Specified by:
        intersection in interface DSet
        Parameters:
        otherSet - The other set to be used in the intersection operation.
        Returns:
        A newly created DSet instance that contains the intersection of the two sets.
      • properSubsetOf

        public boolean properSubsetOf​(DSet otherSet)
        Not implemented yet.
        Specified by:
        properSubsetOf in interface DSet
        Parameters:
        otherSet - Another set.
        Returns:
        True if this set is a proper subset of the set referenced by otherSet, otherwise false.
      • properSupersetOf

        public boolean properSupersetOf​(DSet otherSet)
        Not implemented yet.
        Specified by:
        properSupersetOf in interface DSet
        Parameters:
        otherSet - Another set.
        Returns:
        True if this set is a proper superset of the set referenced by otherSet, otherwise false.
      • subsetOf

        public boolean subsetOf​(DSet otherSet)
        Not implemented yet.
        Specified by:
        subsetOf in interface DSet
        Parameters:
        otherSet - Another set.
        Returns:
        True if this set is a subset of the set referenced by otherSet, otherwise false.
      • supersetOf

        public boolean supersetOf​(DSet otherSet)
        Not implemented yet.
        Specified by:
        supersetOf in interface DSet
        Parameters:
        otherSet - Another set.
        Returns:
        True if this set is a superset of the set referenced by otherSet, otherwise false.
      • union

        public DSet union​(DSet otherSet)
        Not implemented yet.
        Specified by:
        union in interface DSet
        Parameters:
        otherSet - The other set to be used in the union operation.
        Returns:
        A newly created DSet instance that contains the union of the two sets.
      • add

        public boolean add​(java.lang.Object element)
        Appends the specified element to this Bag.
        Specified by:
        add in interface java.util.Collection
        Specified by:
        add in interface java.util.Set
        Overrides:
        add in class java.util.AbstractCollection
      • clear

        public void clear()
        Removes all of the elements from this set.
        Specified by:
        clear in interface java.util.Collection
        Specified by:
        clear in interface java.util.Set
        Overrides:
        clear in class java.util.AbstractCollection
      • contains

        public boolean contains​(java.lang.Object o)
        Returns true if this set contains the specified element.
        Specified by:
        contains in interface java.util.Collection
        Specified by:
        contains in interface java.util.Set
        Overrides:
        contains in class java.util.AbstractCollection
      • isEmpty

        public boolean isEmpty()
        Returns true if this set contains no elements.
        Specified by:
        isEmpty in interface java.util.Collection
        Specified by:
        isEmpty in interface java.util.Set
        Overrides:
        isEmpty in class java.util.AbstractCollection
      • remove

        public boolean remove​(java.lang.Object o)
        Removes the given element from this set if it is present.
        Specified by:
        remove in interface java.util.Collection
        Specified by:
        remove in interface java.util.Set
        Overrides:
        remove in class java.util.AbstractCollection
      • size

        public int size()
        Returns the number of elements in this Set.
        Specified by:
        size in interface java.util.Collection
        Specified by:
        size in interface java.util.Set
        Overrides:
        size in class RasCollection