public class Set
extends java.util.ArrayList
Set
class provides a data structure of a set.
title: SystemCoreLib
description: a set
copyright: (c) 2012 thomas kaffka, born at 11/08/1959 in düsseldorf - germany , all rights reserved.
Constructor and Description |
---|
Set()
The constructor
Set creates a new instance(object) of the class. |
Modifier and Type | Method and Description |
---|---|
void |
addAllElements(java.util.ArrayList list)
The method
addAllElements adds all elements of a given array list. |
void |
addAllElements(Set set)
The method
addAllElements adds all elements of a given set. |
boolean |
addElement(java.lang.Object element)
The method
addElement adds an element to the set. |
void |
assignment(java.util.ArrayList set)
The method
assignment assigns the array list to the internal set. |
void |
assignment(Set set)
The method
assignment assigns the set to the internal set. |
Set |
difference(Set set)
The method
difference creates the difference between the both sets. |
boolean |
equals(Set set)
The method
equals tests, if the parameter set equals the own set. |
Set |
intersection(Set set)
The method
intersection creates the intersection between the both sets. |
boolean |
isElement(java.lang.Object element)
The method
isElement checks, if the object is an element of the set. |
boolean |
isEmpty()
The method
isEmpty checks, if this set is empty. |
boolean |
isSubset(Set set)
The method
isSubset tests, if the parameter set is a subset of the own set. |
Set |
union(Set set)
The method
union creates the union between the both sets. |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
public Set()
Set
creates a new instance(object) of the class.public boolean isEmpty()
isEmpty
checks, if this set is empty.isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.List
isEmpty
in class java.util.ArrayList
public boolean isElement(java.lang.Object element)
isElement
checks, if the object is an element of the set.element
- an object.public boolean equals(Set set)
equals
tests, if the parameter set equals the own set.set
- the set to check.public boolean isSubset(Set set)
isSubset
tests, if the parameter set is a subset of the own set.set
- the set to check.public boolean addElement(java.lang.Object element)
addElement
adds an element to the set.element
- the element to add.public void addAllElements(Set set)
addAllElements
adds all elements of a given set.set
- the set to add.public void addAllElements(java.util.ArrayList list)
addAllElements
adds all elements of a given array list.list
- the array list to add.public void assignment(java.util.ArrayList set)
assignment
assigns the array list to the internal set.set
- the array list to assign.public void assignment(Set set)
assignment
assigns the set to the internal set.set
- the set to assign.public Set intersection(Set set)
intersection
creates the intersection between the both sets.set
- the set to create the intersection.public Set union(Set set)
union
creates the union between the both sets.set
- the set to create the union.