[Go] change Interval.contains to public instead of add wrapper function.

This commit is contained in:
WAKAYAMA Shirou 2017-07-07 14:41:01 +09:00
parent 9eb7edbf30
commit 1054e658b2
1 changed files with 1 additions and 5 deletions

View File

@ -32,10 +32,6 @@ func (i *Interval) GetStop() int {
}
func (i *Interval) Contains(item int) bool {
return i.contains(item)
}
func (i *Interval) contains(item int) bool {
return item >= i.start && item < i.stop
}
@ -143,7 +139,7 @@ func (i *IntervalSet) contains(item int) bool {
return false
}
for k := 0; k < len(i.intervals); k++ {
if i.intervals[k].contains(item) {
if i.intervals[k].Contains(item) {
return true
}
}