- Timestamp:
- 09/16/19 16:12:21 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Data/3.3/PercentValue.cs
r17226 r17253 21 21 22 22 using System; 23 using HEAL.Attic; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 using HEAL.Attic;26 26 27 27 namespace HeuristicLab.Data { … … 51 51 } 52 52 public PercentValue() : base() { } 53 public PercentValue(double value ) : base(value) { }54 55 public PercentValue(double value, bool restrictToUnitInterval )53 public PercentValue(double value, bool @readonly = false) : base(value, @readonly) { } 54 // TODO: suggest to remove the following constructor [ABE] 55 public PercentValue(double value, bool restrictToUnitInterval, bool @readonly = false) 56 56 : base() { 57 57 this.restrictToUnitInterval = restrictToUnitInterval; … … 59 59 throw new ArgumentException("Value must lie in the interval [0,1]."); 60 60 this.value = value; 61 this.readOnly = @readonly; 61 62 } 62 63 … … 101 102 } 102 103 } 104 105 public new PercentValue AsReadOnly() { 106 return (PercentValue)base.AsReadOnly(); 107 } 103 108 } 104 109 }
Note: See TracChangeset
for help on using the changeset viewer.