Make Resource comparable.
This commit is contained in:
@@ -25,7 +25,7 @@ import static com.threerings.getdown.Log.log;
|
|||||||
/**
|
/**
|
||||||
* Models a single file resource used by an {@link Application}.
|
* 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.
|
* 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)
|
@Override public boolean equals (Object other)
|
||||||
{
|
{
|
||||||
if (other instanceof Resource) {
|
if (other instanceof Resource) {
|
||||||
|
|||||||
Reference in New Issue
Block a user