Equal overrides
This commit is contained in:
@ -6,4 +6,9 @@ public class DurationRange : RandomIntegerRange
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
return obj is IntensityRange && base.Equals(obj);
|
||||
}
|
||||
}
|
@ -6,4 +6,9 @@ public class IntensityRange : RandomIntegerRange
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
return obj is IntensityRange && base.Equals(obj);
|
||||
}
|
||||
}
|
@ -24,4 +24,11 @@ public abstract class RandomIntegerRange
|
||||
{
|
||||
return $"Min: {Min} Max: {Max}";
|
||||
}
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
return obj is RandomIntegerRange rir &&
|
||||
this.Min == rir.Min &&
|
||||
this.Max == rir.Max;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user