Home
last modified time | relevance | path

Searched refs:Token (Results 1 – 25 of 45) sorted by relevance

12

/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DHanziToPinyin.java40 public static class Token { class in HanziToPinyin
50 public Token() { in Token() method in HanziToPinyin.Token
53 public Token(int type, String source, String target) { in Token() method in HanziToPinyin.Token
98 private void tokenize(char character, Token token) { in tokenize()
103 token.type = Token.LATIN; in tokenize()
110 token.type = Token.LATIN; in tokenize()
116 token.type = Token.PINYIN; in tokenize()
120 token.type = Token.UNKNOWN; in tokenize()
137 public ArrayList<Token> getTokens(final String input) { in getTokens()
138 ArrayList<Token> tokens = new ArrayList<Token>(); in getTokens()
[all …]
DContactLocaleUtils.java29 import com.android.providers.contacts.HanziToPinyin.Token;
405 ArrayList<Token> tokens = HanziToPinyin.getInstance().getTokens(name); in getPinyinNameLookupKeys()
414 final Token token = tokens.get(i); in getPinyinNameLookupKeys()
415 if (Token.UNKNOWN == token.type) { in getPinyinNameLookupKeys()
418 if (Token.PINYIN == token.type) { in getPinyinNameLookupKeys()
421 } else if (Token.LATIN == token.type) { in getPinyinNameLookupKeys()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DHanziToPinyinTest.java23 import com.android.providers.contacts.HanziToPinyin.Token;
43 ArrayList<Token> tokens = HanziToPinyin.getInstance().getTokens(hanziString); in test()
49 tokens.get(0).type, Token.UNKNOWN); in test()
56 tokens.get(0).type, Token.PINYIN); in test()
68 ArrayList<Token> tokens = HanziToPinyin.getInstance().getTokens(ONE_HANZI); in testGetToken()
70 assertEquals(tokens.get(0).type, Token.PINYIN); in testGetToken()
75 assertEquals(tokens.get(0).type, Token.PINYIN); in testGetToken()
76 assertEquals(tokens.get(1).type, Token.PINYIN); in testGetToken()
82 assertEquals(tokens.get(0).type, Token.LATIN); in testGetToken()
86 assertEquals(tokens.get(0).type, Token.UNKNOWN); in testGetToken()
[all …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DLevenshteinSuggestionFormatter.java20 import com.android.quicksearchbox.util.LevenshteinDistance.Token;
43 final Token[] queryTokens = tokenize(query); in formatSuggestion()
44 final Token[] suggestionTokens = tokenize(suggestion); in formatSuggestion()
55 final Token t = suggestionTokens[i]; in formatSuggestion()
82 int[] findMatches(Token[] source, Token[] target) { in findMatches()
99 Token[] tokenize(final String seq) { in tokenize()
104 Token[] tokens = new Token[len]; in tokenize()
116 tokens[tokenCount++] = new Token(chars, start, end); in tokenize()
120 Token[] ret = new Token[tokenCount]; in tokenize()
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/field/contenttype/parser/
DContentTypeParser.java65 Token type; in parse()
66 Token subtype; in parse()
88 Token attrib; in parameter()
98 Token t; in value()
117 public Token token, jj_nt;
135 token = new Token(); in ContentTypeParser()
147 token = new Token(); in ReInit()
156 token = new Token(); in ContentTypeParser()
165 token = new Token(); in ReInit()
173 token = new Token(); in ContentTypeParser()
[all …]
DToken.java23 public class Token { class
52 public Token next;
66 public Token specialToken;
88 public static final Token newToken(int ofKind) in newToken()
92 default : return new Token(); in newToken()
DContentTypeParserTokenManager.java671 protected Token jjFillToken() in jjFillToken()
673 Token t = Token.newToken(jjmatchedKind); in jjFillToken()
691 public Token getNextToken() in getNextToken()
694 Token specialToken = null; in getNextToken()
695 Token matchedToken; in getNextToken()
863 void TokenLexicalActions(Token matchedToken) in TokenLexicalActions()
/packages/services/Telephony/src/org/apache/james/mime4j/field/contenttype/parser/
DContentTypeParser.java65 Token type; in parse()
66 Token subtype; in parse()
88 Token attrib; in parameter()
98 Token t; in value()
117 public Token token, jj_nt;
135 token = new Token(); in ContentTypeParser()
147 token = new Token(); in ReInit()
156 token = new Token(); in ContentTypeParser()
165 token = new Token(); in ReInit()
173 token = new Token(); in ContentTypeParser()
[all …]
DToken.java23 public class Token { class
52 public Token next;
66 public Token specialToken;
88 public static final Token newToken(int ofKind) in newToken()
92 default : return new Token(); in newToken()
DContentTypeParserTokenManager.java671 protected Token jjFillToken() in jjFillToken()
673 Token t = Token.newToken(jjmatchedKind); in jjFillToken()
691 public Token getNextToken() in getNextToken()
694 Token specialToken = null; in getNextToken()
695 Token matchedToken; in getNextToken()
863 void TokenLexicalActions(Token matchedToken) in TokenLexicalActions()
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/field/datetime/parser/
DDateTimeParser.java38 private static int parseDigits(Token token) { in parseDigits()
212 Token t; in day()
277 Token t; in year()
303 Token t; in hour()
310 Token t; in minute()
317 Token t; in second()
324 Token t, u; int z; in zone()
354 Token t; int z; in obs_zone()
411 public Token token, jj_nt;
434 token = new Token(); in DateTimeParser()
[all …]
DToken.java23 public class Token { class
52 public Token next;
66 public Token specialToken;
88 public static final Token newToken(int ofKind) in newToken()
92 default : return new Token(); in newToken()
/packages/services/Telephony/src/org/apache/james/mime4j/field/datetime/parser/
DDateTimeParser.java38 private static int parseDigits(Token token) { in parseDigits()
212 Token t; in day()
277 Token t; in year()
303 Token t; in hour()
310 Token t; in minute()
317 Token t; in second()
324 Token t, u; int z; in zone()
354 Token t; int z; in obs_zone()
411 public Token token, jj_nt;
434 token = new Token(); in DateTimeParser()
[all …]
DToken.java23 public class Token { class
52 public Token next;
66 public Token specialToken;
88 public static final Token newToken(int ofKind) in newToken()
92 default : return new Token(); in newToken()
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/
DLevenshteinDistance.java33 private final Token[] mSource;
34 private final Token[] mTarget;
38 public LevenshteinDistance(Token[] source, Token[] target) { in LevenshteinDistance()
65 final Token[] src = mSource; in calculate()
66 final Token[] trg = mTarget; in calculate()
72 Token sourceToken = src[s-1]; in calculate()
74 Token targetToken = trg[t-1]; in calculate()
149 public static final class Token implements CharSequence { class in LevenshteinDistance
154 public Token(char[] container, int start, int end) { in Token() method in LevenshteinDistance.Token
170 public boolean prefixOf(final Token that) { in prefixOf()
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/field/address/parser/
DAddressListParser.java506 jjtreeOpenNodeScope(jjtn000);Token t; in local_part()
568 jjtreeOpenNodeScope(jjtn000);Token t; in domain()
628 Token xsp; in jj_3R_11()
640 Token xsp; in jj_3R_13()
661 Token xsp; in jj_3R_12()
670 Token xsp; in jj_3R_10()
685 Token xsp; in jj_3R_9()
700 public Token token, jj_nt;
702 private Token jj_scanpos, jj_lastpos;
730 token = new Token(); in AddressListParser()
[all …]
DToken.java23 public class Token { class
52 public Token next;
66 public Token specialToken;
88 public static final Token newToken(int ofKind) in newToken()
92 default : return new Token(); in newToken()
DBaseNode.java23 import org.apache.james.mime4j.field.address.parser.Token;
27 public Token firstToken;
28 public Token lastToken;
/packages/services/Telephony/src/org/apache/james/mime4j/field/address/parser/
DAddressListParser.java506 jjtreeOpenNodeScope(jjtn000);Token t; in local_part()
568 jjtreeOpenNodeScope(jjtn000);Token t; in domain()
628 Token xsp; in jj_3R_11()
640 Token xsp; in jj_3R_13()
661 Token xsp; in jj_3R_12()
670 Token xsp; in jj_3R_10()
685 Token xsp; in jj_3R_9()
700 public Token token, jj_nt;
702 private Token jj_scanpos, jj_lastpos;
730 token = new Token(); in AddressListParser()
[all …]
DToken.java23 public class Token { class
52 public Token next;
66 public Token specialToken;
88 public static final Token newToken(int ofKind) in newToken()
92 default : return new Token(); in newToken()
DBaseNode.java23 import org.apache.james.mime4j.field.address.parser.Token;
27 public Token firstToken;
28 public Token lastToken;
/packages/apps/ExactCalculator/src/com/android/calculator2/
DCalculatorExpr.java53 private ArrayList<Token> mExpr; // The actual representation
62 private static abstract class Token { class in CalculatorExpr
82 private static class Operator extends Token {
115 private static class Constant extends Token implements Cloneable {
304 private static class PreEval extends Token {
389 public static Token newToken(DataInput in) throws IOException { in newToken()
403 mExpr = new ArrayList<Token>(); in CalculatorExpr()
406 private CalculatorExpr(ArrayList<Token> expr) { in CalculatorExpr()
414 mExpr = new ArrayList<Token>(); in CalculatorExpr()
441 Token t = mExpr.get(s-1); in hasTrailingConstant()
[all …]
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/util/
DLevenshteinDistanceTest.java20 import com.android.quicksearchbox.util.LevenshteinDistance.Token;
39 Token[] sourceTokens = makeTokens(source); in verifyTargetOperations()
40 Token[] targetTokens = makeTokens(target); in verifyTargetOperations()
59 private Token[] makeTokens(String[] strings) { in makeTokens()
60 Token[] tokens = new Token[strings.length]; in makeTokens()
63 tokens[i] = new Token(str.toCharArray(), 0, str.length()); in makeTokens()
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
DLevenshteinFormatterTest.java20 import com.android.quicksearchbox.util.LevenshteinDistance.Token;
44 Token[] tokens = mFormatter.tokenize(input); in verifyTokenizeResult()
94 Token[] sourceTokens = mFormatter.tokenize(source); in verifyFindMatches()
95 Token[] targetTokens = mFormatter.tokenize(target); in verifyFindMatches()
113 Token srcToken = sourceTokens[sourceIdx]; in verifyFindMatches()
114 Token trgToken = targetTokens[i]; in verifyFindMatches()
/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/
Dpointer.h89 struct Token { struct
155 …GenericPointer(const Token* tokens, size_t tokenCount) : allocator_(), ownAllocator_(), nameBuffer… in GenericPointer()
201 GenericPointer Append(const Token& token, Allocator* allocator = 0) const {
220 Token token = { name, length, kPointerInvalidIndex };
260 Token token = { (Ch*)buffer, length, index };
267 Token token = { name, length, index };
306 const Token* GetTokens() const { return tokens_; } in GetTokens()
391 for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) {
460 for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) { in Get()
688 const Token* last = tokens_ + (tokenCount_ - 1); in Erase()
[all …]

12