Skip to content
Browse files

Util.equals unboxed support for long/double

  • Loading branch information...
1 parent 4003a1c commit 863decce5f38c8cde9882a0e172cbfe469f05743 @richhickey richhickey committed Jun 17, 2010
Showing with 24 additions and 0 deletions.
  1. +24 −0 src/jvm/clojure/lang/Util.java
View
24 src/jvm/clojure/lang/Util.java
@@ -35,6 +35,30 @@ static public boolean equals(Object k1, Object k2){
return k1 != null && k1.equals(k2);
}
+static public boolean equals(long x, long y){
+ return x == y;
+}
+
+static public boolean equals(double x, double y){
+ return x == y;
+}
+
+static public boolean equals(long x, Object y){
+ return equals((Object)x,y);
+}
+
+static public boolean equals(Object x, long y){
+ return equals(x,(Object)y);
+}
+
+static public boolean equals(double x, Object y){
+ return equals((Object)x,y);
+}
+
+static public boolean equals(Object x, double y){
+ return equals(x,(Object)y);
+}
+
static public boolean identical(Object k1, Object k2){
return k1 == k2;
}

0 comments on commit 863decc

Please sign in to comment.
Something went wrong with that request. Please try again.