Modifier and Type | Field and Description |
---|---|
private java.io.File |
file |
private java.util.Map<java.lang.Integer,GeoLocation> |
id2loc |
private static ConcurrentLog |
log |
private java.util.TreeMap<java.lang.StringBuilder,java.util.List<java.lang.Integer>> |
name2ids |
Constructor and Description |
---|
GeonamesLocation(java.io.File file,
WordCache dymLib,
long minPopulation) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other)
compare localization services; to be used for hash sets with localization services
|
java.util.TreeSet<GeoLocation> |
find(java.lang.String anyname,
boolean locationexact)
find a location by name
|
int |
hashCode()
hashCode that must be used to distinguish localization services in hash sets
|
boolean |
isEmpty() |
java.util.Set<java.lang.String> |
locationNames()
produce a set of location names
|
java.lang.String |
nickname()
return an nickname of the localization service
|
java.util.Set<java.lang.String> |
recommend(java.lang.String s)
recommend a set of names according to a given name
|
java.util.Set<java.lang.StringBuilder> |
recommend(java.lang.StringBuilder s)
recommend a set of names according to a given name
|
int |
size()
the number of locations that this localization stores
|
private static final ConcurrentLog log
private final java.util.Map<java.lang.Integer,GeoLocation> id2loc
private final java.util.TreeMap<java.lang.StringBuilder,java.util.List<java.lang.Integer>> name2ids
private final java.io.File file
public GeonamesLocation(java.io.File file, WordCache dymLib, long minPopulation)
public int size()
Locations
public boolean isEmpty()
public java.util.TreeSet<GeoLocation> find(java.lang.String anyname, boolean locationexact)
Locations
public java.util.Set<java.lang.String> locationNames()
locationNames
in interface Locations
public java.util.Set<java.lang.String> recommend(java.lang.String s)
Locations
public java.util.Set<java.lang.StringBuilder> recommend(java.lang.StringBuilder s)
Locations
public java.lang.String nickname()
Locations
public int hashCode()
Locations
public boolean equals(java.lang.Object other)
Locations