Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/jvm/fleetdb/Compare.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import clojure.lang.Keyword;
import clojure.lang.Numbers;
import clojure.lang.IPersistentVector;

public class Compare {
static final Keyword NEG_INF = Keyword.intern(null, "neg-inf");
static final Keyword POS_INF = Keyword.intern(null, "pos-inf");
static final Keyword POS_INF = Keyword.intern(null, "pos-inf");

public static void cannotCompare(Object a, Object b) throws FleetDBException {
throw new FleetDBException(
"Cannot compare " + a.toString() + " and " + b.toString());
Expand Down Expand Up @@ -54,27 +54,27 @@ public static int compare(Object a, Object b) throws FleetDBException {
"Cannot compare " + a.toString() + " and " + b.toString());
}
}

public static boolean eq(Object a, Object b) throws FleetDBException{
return compare(a, b) == 0;
}

public static boolean neq(Object a, Object b) throws FleetDBException {
return compare(a, b) != 0;
}

public static boolean lt(Object a, Object b) throws FleetDBException {
return compare(a, b) < 0;
}

public static boolean lte(Object a, Object b) throws FleetDBException {
return compare(a, b) <= 0;
}

public static boolean gt(Object a, Object b) throws FleetDBException {
return compare(a, b) > 0;
}

public static boolean gte(Object a, Object b) throws FleetDBException {
return compare(a, b) >= 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/jvm/fleetdb/FleetDBException.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package fleetdb;

public class FleetDBException extends Exception {
public FleetDBException(String msg) { super(msg); }
public FleetDBException() { super(); }
Expand Down