Created
June 2, 2013 11:44
-
-
Save AtkinsSJ/5693400 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private HashMap<String, String> tracks; | |
// ... | |
tracks = new HashMap<String, String>(); | |
tracks.put("Dumb Loop", "track1.svg"); | |
tracks.put("Dumb Loop 2", "track1.svg"); | |
tracks.put("Dumb Loop 3", "track1.svg"); | |
tracks.put("All these are the same", "track1.svg"); | |
// ... | |
public String[] getTrackNames() { | |
String[] trackNames = this.tracks.keySet().toArray(new String[0]); | |
Arrays.sort(trackNames); | |
return trackNames; | |
} | |
public String getTrackFileFromName(String trackName) { | |
return this.tracks.get(trackName); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment