|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Provides an abstract implementation of the Foley.Utilities.Collections.ISet interface and extends Foley.Utilities.Collections.Collection2Base.
The main purpose of this is an all purpose base class that can be extended by any class that wants to be a set.
Constructor Summary | |
---|---|
SetBase() Protected constructor for abstract class. |
Properties inherited from class Foley.Utilities.Collections.Collection2Base |
---|
Count, IsEmpty, IsFixedSize, IsReadOnly, IsSynchronized, SyncRoot |
Method Summary | |
---|---|
bool |
Add(System.Collections.ICollection collection) Adds the elements of the specified System.Collections.ICollection to the set. |
bool |
Add(object value) When implemented by a class, adds an System.Object to the set. |
bool |
Contains(System.Collections.ICollection collection) Determines whether all the elements in the specified System.Collections.ICollection are contained in the set. |
bool |
Contains(object value) Determines whether the specified System.Object is in the set. |
bool |
Remove(System.Collections.ICollection collection) Removes the first occurrence of each element of the specified System.Collections.ICollection from the set. |
bool |
Remove(object value) When implemented by a class, removes the first occurrence of a specific System.Object from the set. |
bool |
Retain(System.Collections.ICollection collection) Retains the first occurrence of each element of the specified System.Collections.ICollection from the set. |
Methods inherited from class Foley.Utilities.Collections.Collection2Base |
---|
Clear, CopyTo, GetEnumerator, IsContainedIn |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString |
Constructor Detail |
---|
protected SetBase()
Protected constructor for abstract class.
Method Detail |
---|
public bool Add(System.Collections.ICollection collection)
Adds the elements of the specified System.Collections.ICollection to the set.
Parameters:
collection
-
The System.Collections.ICollection whose elements are added to the set.
System.NullReferenceException
-
The collection is a null reference
(Nothing in Visual Basic).
public bool Add(object value)
When implemented by a class, adds an System.Object to the set.
Parameters:
value
- true if the set is modified; otherwise false.
public bool Contains(System.Collections.ICollection collection)
Determines whether all the elements in the specified System.Collections.ICollection are contained in the set.
This method determines equality by calling System.Object.Equals(System.Object). Keep in mind that the System.Object to locate can be a null reference (Nothing in Visual Basic). If you do not want this behaviour you must override this method.
Parameters:collection
-
The System.Collections.ICollection whose elements are to be checked if
all of its elements are contained in the set.
System.NullReferenceException
-
The collection is a null reference
(Nothing in Visual Basic).
public bool Contains(object value)
Determines whether the specified System.Object is in the set.
This method determines equality by calling System.Object.Equals(System.Object). Keep in mind that the System.Object to locate can be a null reference (Nothing in Visual Basic). If you do not want this behaviour you must override this method.
Parameters:value
-
The System.Object to check if it is contained in the set.
public bool Remove(System.Collections.ICollection collection)
Removes the first occurrence of each element of the specified System.Collections.ICollection from the set.
Parameters:
collection
-
The System.Collections.ICollection used to determine what
elements to remove from the set.
System.NotSupportedException
- The set is read-only.
-or-The set has a fixed size.
public bool Remove(object value)
When implemented by a class, removes the first occurrence of a specific System.Object from the set.
Parameters:
value
-
The System.Object to remove from the set.
public bool Retain(System.Collections.ICollection collection)
Retains the first occurrence of each element of the specified System.Collections.ICollection from the set.
Parameters:
collection
-
The System.Collections.ICollection used to determine what
elements to be retained in the set.
System.NotSupportedException
- The set is read-only.
-or-The set has a fixed size.
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |