Package gw.internal.gosu.properties
Class PropertiesTypeLoader.TypeNameSet
- java.lang.Object
-
- gw.internal.gosu.properties.PropertiesTypeLoader.TypeNameSet
-
- Enclosing class:
- PropertiesTypeLoader
static class PropertiesTypeLoader.TypeNameSet extends java.lang.ObjectSet of case insensitive type names with operation to quickly find which type names in the set are possible matches for a full type name. A match is a prefix which is either an exact match or matches up to the package separator (.). So, for example, given the full name one.two.three then one, one.two and one.two.three are all matches.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]_names
-
Constructor Summary
Constructors Constructor Description TypeNameSet(java.util.Set<java.lang.String> names)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTo(java.util.Collection<java.lang.String> names)java.util.List<java.lang.String>findMatchesFor(java.lang.String fullName)private intgetIndexOfLastPossibleMatch(java.lang.String fullName)private booleanisMatch(java.lang.String prefix, java.lang.String fullName)private booleanisPrefix(java.lang.String possiblePrefix, java.lang.String fullName)
-
-
-
Method Detail
-
addTo
public void addTo(java.util.Collection<java.lang.String> names)
-
findMatchesFor
public java.util.List<java.lang.String> findMatchesFor(java.lang.String fullName)
-
getIndexOfLastPossibleMatch
private int getIndexOfLastPossibleMatch(java.lang.String fullName)
-
isPrefix
private boolean isPrefix(java.lang.String possiblePrefix, java.lang.String fullName)
-
isMatch
private boolean isMatch(java.lang.String prefix, java.lang.String fullName)
-
-