org.hl7.types
Interface SET<T extends ANY>

Type Parameters:
T - contained data type
All Superinterfaces:
ANY
All Known Subinterfaces:
DSET<T>, EIVL, IVL<T>, PIVL<T>, QSET<T>
All Known Implementing Classes:
DSETnull, EIVLimpl, EmptySet, IVLimpl, IVLnull, PIVLimpl, PIVLnull, QSETDifferenceImpl, QSETIntersectionImpl, QSETnull, QSETPeriodicHullImpl, QSETSingularityImpl, QSETTermBase, QSETUnionImpl, SETjuSetAdapter, SETnull, SETSingleton

public interface SET<T extends ANY>
extends ANY

A value that contains other distinct values in no particular order.

 template<ANY T>
 type Set<T> alias SET<T> specializes ANY {
              BL      contains(T element);
              BL      isEmpty;
              BL      notEmpty;
              BL      contains(SET<T> subset);
              INT     cardinality;
              SET<T>  union(SET<T> otherset);
              SET<T>  union(T element);
              SET<T>  except(T element);
              SET<T>  except(SET<T> otherset);
              SET<T>  intersection(SET<T> otherset);
   literal    ST;
   promotion  SET<T>  (T x);
              IVL<T>  hull;
 };
 

See Also:
Set (SET)

Method Summary
 T any()
          return "any" element of the set *
 INT cardinality()
           
 BL contains(SET<T> subset)
           
 BL contains(T element)
          A relation of the set with its elements, true if the given value is an element of the set.
 SET<T> except(SET<T> otherset)
           
 SET<T> except(T element)
           
 SET<T> intersection(SET<T> otherset)
           
 BL isEmpty()
           
 BL nonEmpty()
           
 SET<T> select(Criterion<T> c)
          Allow an element of this set to be selected according to a Criterion
 SET<T> union(SET<T> otherset)
           
 
Methods inherited from interface org.hl7.types.ANY
equal, isNull, isNullJ, nonNull, nonNullJ, notApplicable, notApplicableJ, nullFlavor, other, otherJ, unknown, unknownJ
 

Method Detail

contains

BL contains(T element)

A relation of the set with its elements, true if the given value is an element of the set.

This is the primitive semantic property of a set, based on which all other properties are defined.

A set may only contain distinct non-NULL elements. Exceptional values (NULL-values) cannot be elements of a set.

 invariant(SET<T> s, T n)
       where s.nonNull.and(n.isNull) {
    s.contains(n).not;
 };
 

Parameters:
element -
Returns:

isEmpty

BL isEmpty()

nonEmpty

BL nonEmpty()

contains

BL contains(SET<T> subset)

cardinality

INT cardinality()

union

SET<T> union(SET<T> otherset)

except

SET<T> except(T element)

except

SET<T> except(SET<T> otherset)

intersection

SET<T> intersection(SET<T> otherset)

select

SET<T> select(Criterion<T> c)
Allow an element of this set to be selected according to a Criterion


any

T any()
return "any" element of the set *