Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
CaseInsensitiveStringValues.cs
1using System;
4
6{
11 {
12 private static readonly int hashCode = typeof(CaseInsensitiveStringValues).FullName.GetHashCode();
13
18 {
19 }
20
25
31 public override bool Contains(IElement Element)
32 {
33 return Element is StringValue S && S.CaseInsensitive;
34 }
35
37 public override bool Equals(object obj)
38 {
39 return obj is CaseInsensitiveStringValues;
40 }
41
43 public override int GetHashCode()
44 {
45 return hashCode;
46 }
47
54 public int Compare(IElement x, IElement y)
55 {
58
59 return string.Compare(s1.Value, s2.Value, true);
60 }
61 }
62}
Base class for all types of elements.
Definition: Element.cs:13
Base class for all types of semigroups.
Definition: SemiGroup.cs:10
Semi-group of case-insensitive string values.
override bool Contains(IElement Element)
Checks if the set contains an element.
static readonly CaseInsensitiveStringValues Instance
Instance of the set of case-insensitive string values.
override int GetHashCode()
Calculates a hash code of the element. Hash code.
override bool Equals(object obj)
Compares the element to another. If elements are equal.
CaseInsensitiveStringValues()
Semi-group of case-insensitive string values.
int Compare(IElement x, IElement y)
Compares two string values.
string Value
String value.
Definition: StringValue.cs:46
bool CaseInsensitive
If the string value is case insensitive or not.
Definition: StringValue.cs:55
Basic interface for all types of elements.
Definition: IElement.cs:20
Basic interface for ordered sets.
Definition: IOrderedSet.cs:11