Documentation of 'jsci.maths.FiniteSet' Java class
FiniteSet
jsci.maths

Class FiniteSet

  • All Implemented Interfaces:
    MathSet


    public final class FiniteSet
    extends java.lang.Object
    implements MathSet
    A set containing a finite number of elements. This class provides a bridge between java.util.Set and JSci.maths.MathSet.
    • Constructor Summary

      Constructors 
      Constructor and Description
      FiniteSet(java.util.Set set)
      Constructs a finite set.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int cardinality()
      Returns the cardinality.
      boolean equals(java.lang.Object s)
      Compares two sets for equality.
      java.util.Set getElements()
      Returns the elements of this set.
      int hashCode() 
      MathSet intersect(MathSet set)
      Performs the intersection of this set with another.
      java.lang.String toString()
      Returns a string representing this set.
      MathSet union(MathSet set)
      Performs the union of this set with another.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FiniteSet

        public FiniteSet(java.util.Set set)
        Constructs a finite set.
        Parameters:
        set - a set of elements
    • Method Detail

      • equals

        public boolean equals(java.lang.Object s)
        Compares two sets for equality.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Returns a string representing this set.
        Overrides:
        toString in class java.lang.Object
      • getElements

        public java.util.Set getElements()
        Returns the elements of this set.
      • cardinality

        public int cardinality()
        Returns the cardinality.
        Specified by:
        cardinality in interface MathSet
      • union

        public MathSet union(MathSet set)
        Performs the union of this set with another.
        Specified by:
        union in interface MathSet
        Parameters:
        set - a set.
        Returns:
        the union of the two sets.
      • intersect

        public MathSet intersect(MathSet set)
        Performs the intersection of this set with another.
        Specified by:
        intersect in interface MathSet
        Parameters:
        set - a set.
        Returns:
        the intersection of the two sets.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.