Changeset 16925 for branches/2971_named_intervals
- Timestamp:
- 05/08/19 15:52:35 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Interval/IntervalCollection.cs
r16921 r16925 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Linq; 24 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; … … 34 35 get => HeuristicLab.Common.Resources.VSImageLibrary.Object; 35 36 } 36 p ublicIDictionary<string, Interval> VariableIntervals { get; } = new Dictionary<string, Interval>();37 private IDictionary<string, Interval> VariableIntervals { get; } = new Dictionary<string, Interval>(); 37 38 38 39 [Storable(Name = "StorableIntervalInformation")] … … 67 68 } 68 69 69 public Interval getInterval(string variable) { 70 if (VariableIntervals.ContainsKey(variable)) { 71 return VariableIntervals[variable]; 72 } else { 73 throw new ArgumentException($"The given variable:{variable} is not present!"); 74 } 70 public Interval GetInterval(string variable) { 71 if (!VariableIntervals.ContainsKey(variable)) throw new ArgumentException($"The given variable:{ variable } is not present!"); 72 73 return VariableIntervals[variable]; 75 74 } 76 75 77 public IDictionary<string, Interval> getIntervals() { 76 public void SetInterval(string key, Interval interval) { 77 VariableIntervals[key] = interval; 78 } 79 80 public void AddInterval(string key, Interval interval) { 81 VariableIntervals.Add(key, interval); 82 } 83 84 public void DeleteInterval(string key) { 85 VariableIntervals.Remove(key); 86 } 87 88 public IDictionary<string, Interval> GetIntervals() { 78 89 return VariableIntervals; 79 90 }
Note: See TracChangeset
for help on using the changeset viewer.