Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SetOfSets.cs
1using System;
4
6{
10 public sealed class SetOfSets : Set
11 {
12 private static readonly int hashCode = typeof(SetOfSets).GetHashCode();
13
17 public SetOfSets()
18 {
19 }
20
24 public static readonly SetOfSets Instance = new SetOfSets();
25
31 public override bool Contains(IElement Element)
32 {
33 return Element is ISet;
34 }
35
41 public override bool Equals(object obj)
42 {
43 return obj is SetOfSets;
44 }
45
50 public override int GetHashCode()
51 {
52 return hashCode;
53 }
54 }
55}
Base class for all types of elements.
Definition: Element.cs:13
Base class for all types of sets.
Definition: Set.cs:14
abstract override int GetHashCode()
Calculates a hash code of the element.
Set containing all sets.
Definition: SetOfSets.cs:11
SetOfSets()
Set containing all sets.
Definition: SetOfSets.cs:17
override bool Equals(object obj)
Compares the element to another.
Definition: SetOfSets.cs:41
override int GetHashCode()
Calculates a hash code of the element.
Definition: SetOfSets.cs:50
override bool Contains(IElement Element)
Checks if the set contains an element.
Definition: SetOfSets.cs:31
static readonly SetOfSets Instance
Instance of the set of all sets.
Definition: SetOfSets.cs:24
Basic interface for all types of elements.
Definition: IElement.cs:20
Basic interface for all types of sets.
Definition: ISet.cs:10