- Timestamp:
- 05/08/19 10:22:58 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalCollection.cs
r16904 r16918 19 19 */ 20 20 #endregion 21 22 using System; 21 23 using System.Collections.Generic; 22 24 using HeuristicLab.Common; … … 32 34 get => HeuristicLab.Common.Resources.VSImageLibrary.Object; 33 35 } 34 public ObservableDictionary<string, Interval> VariableIntervals { get; } = new ObservableDictionary<string, Interval>();36 public IDictionary<string, Interval> VariableIntervals { get; } = new Dictionary<string, Interval>(); 35 37 36 38 [Storable(Name = "StorableIntervalInformation")] … … 61 63 } 62 64 65 public IntervalCollection(IDictionary<string, Interval> variableIntervals) { 66 this.VariableIntervals = variableIntervals; 67 } 68 69 public KeyValuePair<string, Interval> getInterval(string variable) { 70 if (VariableIntervals.ContainsKey(variable)) { 71 return new KeyValuePair<string, Interval>(variable, VariableIntervals[variable]); 72 } else { 73 throw new ArgumentException($"The given variable:{variable} is not present!"); 74 } 75 } 76 77 public IDictionary<string, Interval> getIntervals() { 78 return VariableIntervals; 79 } 80 63 81 public override IDeepCloneable Clone(Cloner cloner) { 64 82 return new IntervalCollection(this, cloner);
Note: See TracChangeset
for help on using the changeset viewer.