Make Resource comparable.

This commit is contained in:
Michael Bayne
2017-09-17 09:29:06 -07:00
parent 99a093a1c7
commit b39e59550f
@@ -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<Resource>
{
/**
* 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) {