public class PreferenceSearchIndex
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PreferenceSearchIndex.MatchResults
Results of match to include a matched term (may have matched multiple) and a score
|
Constructor and Description |
---|
PreferenceSearchIndex(java.lang.Class<? extends AtakPreferenceFragment> fragClass,
java.lang.String parentKey,
java.lang.String key,
java.lang.String summary,
java.lang.String parentSummary,
android.graphics.drawable.Drawable icon,
java.util.List<java.lang.String> terms)
Create index for an individual preference
|
Modifier and Type | Method and Description |
---|---|
java.lang.Class<? extends AtakPreferenceFragment> |
getFragClass()
Gets the ATAK preference fragment that this search index represents.
|
android.graphics.drawable.Drawable |
getIcon() |
java.lang.String |
getKey()
Gets the preference key for the preference described by the search index.
|
PreferenceSearchIndex.MatchResults |
getMatch()
Get results of last match
|
PreferenceSearchIndex.MatchResults |
getMatch(java.lang.String searchTerms)
Match on the search terms
|
java.lang.String |
getParentKey()
Gets the parent key for the search index.
|
java.lang.String |
getParentSummary()
Gets the parent summary for the search index.
|
java.lang.String |
getSummary()
Gets the preference summary for the preference described by the search index.
|
java.util.List<java.lang.String> |
getTerms() |
boolean |
hasIcon()
Checks to see if the preference has a icon
|
boolean |
match(java.lang.String searchTerms) |
java.lang.String |
toString() |
public PreferenceSearchIndex(java.lang.Class<? extends AtakPreferenceFragment> fragClass, java.lang.String parentKey, java.lang.String key, java.lang.String summary, java.lang.String parentSummary, android.graphics.drawable.Drawable icon, java.util.List<java.lang.String> terms)
fragClass
- Class/type of parent Preference/screenkey
- Key of the preferencesummary
- Summary/label of the preferenceparentSummary
- Summary/label of the parent preferenceicon
- Icon of the preferenceterms
- Terms to match on when searchingpublic java.lang.Class<? extends AtakPreferenceFragment> getFragClass()
public java.lang.String getParentSummary()
public java.lang.String getParentKey()
public java.lang.String getKey()
public java.lang.String getSummary()
public boolean hasIcon()
public android.graphics.drawable.Drawable getIcon()
public java.util.List<java.lang.String> getTerms()
public boolean match(java.lang.String searchTerms)
public PreferenceSearchIndex.MatchResults getMatch(java.lang.String searchTerms)
searchTerms
- the search term to look for.public PreferenceSearchIndex.MatchResults getMatch()
public java.lang.String toString()
toString
in class java.lang.Object