diff options
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/DataKey.java')
-rw-r--r-- | src/tools/android/java/com/google/devtools/build/android/DataKey.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/DataKey.java b/src/tools/android/java/com/google/devtools/build/android/DataKey.java index e3a8b9d987..0fbbd1f9ed 100644 --- a/src/tools/android/java/com/google/devtools/build/android/DataKey.java +++ b/src/tools/android/java/com/google/devtools/build/android/DataKey.java @@ -26,7 +26,8 @@ import java.io.OutputStream; * * For Assets, it is the asset path from the assets directory. */ -public interface DataKey { +public interface DataKey extends Comparable<DataKey> { + /** * Writes the Key and the value size to a stream. * @@ -40,4 +41,14 @@ public interface DataKey { * Returns a human readable string representation of the key. */ String toPrettyString(); + + /** + * Defines a total ordering on the different key types to assist in compareTo operations. + */ + enum KeyType { + ASSET_PATH, + FULL_QUALIFIED_NAME + } + + KeyType getKeyType(); } |