Skip to content

Commit

Permalink
Add casting helper method to DataKey
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Aug 7, 2013
1 parent 3e7b3d7 commit 92d70ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/net/citizensnpcs/api/util/DataKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ public String getPath() {

public abstract Object getRaw(String key);

@SuppressWarnings("unchecked")
public <T> T getRawUnchecked(String key) {
return (T) getRaw(key);
}

public DataKey getRelative(int key) {
return getRelative(Integer.toString(key));
}
Expand Down

0 comments on commit 92d70ac

Please sign in to comment.