Back to project page SELP2013.
The source code is released under:
License ======= This work is licensed under the BSD 2-clause license as follows. # BSD 2-clause license Copyright (c) 2013, Sky Welch All rights reserved. Redistribution and use in source and ...
If you think the Android project SELP2013 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package uk.co.skywelch.selp2013; // ww w . j a v a 2 s .c om import java.util.HashMap; import java.util.Map; public class Venue implements Comparable<Venue> { public final String name; public final String description; public final String map; public Venue(String name, String description, String map) { this.name = name; this.description = description; this.map = map; } @Override public int compareTo(Venue another) { return name.compareTo(another.name); } @Override public String toString() { // Populate a hashmap with Venue contents for easier output HashMap<String, String> variables = new HashMap<String, String>(); variables.put("Name", name); variables.put("Description", description); variables.put("Map", map); String ret = "Venue '" + name + "' {"; for (Map.Entry<String, String> entry : variables.entrySet()) { String key = entry.getKey(); String value = entry.getValue(); ret += " " + key + ": '" + value + "'"; } ret += " }"; return ret; } public String getNameAndDescription() { if (!description.isEmpty()) { return description + " (" + name + ")"; } else { return "Unknown (" + name + ")"; } } }