Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
DateTimeValues.cs
1using System;
4
6{
10 public sealed class DateTimeValues : Set, IOrderedSet
11 {
12 private static readonly int hashCode = typeof(DateTimeValues).FullName.GetHashCode();
13
18 {
19 }
20
26 public override bool Contains(IElement Element)
27 {
28 return Element.AssociatedObjectValue is DateTime;
29 }
30
32 public override bool Equals(object obj)
33 {
34 return obj is DateTimeValues;
35 }
36
38 public override int GetHashCode()
39 {
40 return hashCode;
41 }
42
49 public int Compare(IElement x, IElement y)
50 {
53
54 return d1.Value.CompareTo(d2.Value);
55 }
56 }
57}
Base class for all types of elements.
Definition: Element.cs:13
Base class for all types of sets.
Definition: Set.cs:14
DateTime Value
DateTime value.
The set of Date & Time values.
override bool Equals(object obj)
Compares the element to another. If elements are equal.
override bool Contains(IElement Element)
Checks if the set contains an element.
int Compare(IElement x, IElement y)
Compares two DateTime values.
override int GetHashCode()
Calculates a hash code of the element. Hash code.
DateTimeValues()
The set of Date & Time values.
Basic interface for all types of elements.
Definition: IElement.cs:20
Basic interface for ordered sets.
Definition: IOrderedSet.cs:11