diff options
Diffstat (limited to 'src/unheard/interval.clj')
| -rw-r--r-- | src/unheard/interval.clj | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/unheard/interval.clj b/src/unheard/interval.clj index c10161c..bd14c0d 100644 --- a/src/unheard/interval.clj +++ b/src/unheard/interval.clj @@ -5,16 +5,13 @@ (deftype RatioValueInterval [start end value] IInterval - ;; HACK: coerce start to long to work around - ;; class clojure.lang.BigInt cannot be cast to class java.lang.Comparable - (getNormStart [_] (if (instance? clojure.lang.BigInt start) - (long start) - start)) - ;; HACK: coerce start to long to work around - ;; class clojure.lang.BigInt cannot be cast to class java.lang.Comparable - (getNormEnd [_] (if (instance? clojure.lang.BigInt end) - (long end) - end)) + ;; HACK: coerce start to long to work around class clojure.lang.BigInt + ;; cannot be cast to class java.lang.Comparable + (getNormStart [_] + (if (instance? clojure.lang.BigInt start) (long start) start)) + ;; HACK: coerce start to long to work around class clojure.lang.BigInt + ;; cannot be cast to class java.lang.Comparable + (getNormEnd [_] (if (instance? clojure.lang.BigInt end) (long end) end)) (getUniqueIdentifier [_] (str "[" start "," end "]")) (compareTo [_ other] (let [start-cmp (compare start (.getNormStart ^RatioValueInterval other))] |
