From b39e59550f2ec981307b295380a7620ab80b0740 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Sun, 17 Sep 2017 09:29:06 -0700 Subject: [PATCH] Make Resource comparable. --- src/main/java/com/threerings/getdown/data/Resource.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/threerings/getdown/data/Resource.java b/src/main/java/com/threerings/getdown/data/Resource.java index e235d41..9bc09a9 100644 --- a/src/main/java/com/threerings/getdown/data/Resource.java +++ b/src/main/java/com/threerings/getdown/data/Resource.java @@ -25,7 +25,7 @@ import static com.threerings.getdown.Log.log; /** * Models a single file resource used by an {@link Application}. */ -public class Resource +public class Resource implements Comparable { /** * Computes the MD5 hash of the supplied file. @@ -292,6 +292,10 @@ public class Resource } } + @Override public int compareTo (Resource other) { + return _path.compareTo(other._path); + } + @Override public boolean equals (Object other) { if (other instanceof Resource) {