Skip to content

Commit

Permalink
Util.equals unboxed support for long/double
Browse files Browse the repository at this point in the history
  • Loading branch information
richhickey committed Jun 17, 2010
1 parent 4003a1c commit 863decc
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/jvm/clojure/lang/Util.java
Expand Up @@ -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;
}
Expand Down

0 comments on commit 863decc

Please sign in to comment.