id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
35,300
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java
StringSearch.getCE
private int getCE(int sourcece) { // note for tertiary we can't use the collator->tertiaryMask, that // is a preprocessed mask that takes into account case options. since // we are only concerned with exact matches, we don't need that. sourcece &= ceMask_; if (toShift_) { ...
java
private int getCE(int sourcece) { // note for tertiary we can't use the collator->tertiaryMask, that // is a preprocessed mask that takes into account case options. since // we are only concerned with exact matches, we don't need that. sourcece &= ceMask_; if (toShift_) { ...
[ "private", "int", "getCE", "(", "int", "sourcece", ")", "{", "// note for tertiary we can't use the collator->tertiaryMask, that", "// is a preprocessed mask that takes into account case options. since", "// we are only concerned with exact matches, we don't need that.", "sourcece", "&=", ...
Getting the modified collation elements taking into account the collation attributes. @param sourcece @return the modified collation element
[ "Getting", "the", "modified", "collation", "elements", "taking", "into", "account", "the", "collation", "attributes", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java#L605-L629
35,301
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java
StringSearch.initializePatternPCETable
private int initializePatternPCETable() { long[] pcetable = new long[INITIAL_ARRAY_SIZE_]; int pcetablesize = pcetable.length; int patternlength = pattern_.text_.length(); CollationElementIterator coleiter = utilIter_; if (coleiter == null) { coleiter = new Collation...
java
private int initializePatternPCETable() { long[] pcetable = new long[INITIAL_ARRAY_SIZE_]; int pcetablesize = pcetable.length; int patternlength = pattern_.text_.length(); CollationElementIterator coleiter = utilIter_; if (coleiter == null) { coleiter = new Collation...
[ "private", "int", "initializePatternPCETable", "(", ")", "{", "long", "[", "]", "pcetable", "=", "new", "long", "[", "INITIAL_ARRAY_SIZE_", "]", ";", "int", "pcetablesize", "=", "pcetable", ".", "length", ";", "int", "patternlength", "=", "pattern_", ".", "t...
Initializing the pce table for a pattern. Stores non-ignorable collation keys. Table size will be estimated by the size of the pattern text. Table expansion will be perform as we go along. Adding 1 to ensure that the table size definitely increases. @return total number of expansions
[ "Initializing", "the", "pce", "table", "for", "a", "pattern", ".", "Stores", "non", "-", "ignorable", "collation", "keys", ".", "Table", "size", "will", "be", "estimated", "by", "the", "size", "of", "the", "pattern", "text", ".", "Table", "expansion", "wil...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java#L733-L766
35,302
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java
StringSearch.checkIdentical
private boolean checkIdentical(int start, int end) { if (strength_ != Collator.IDENTICAL) { return true; } // Note: We could use Normalizer::compare() or similar, but for short strings // which may not be in FCD it might be faster to just NFD them. String textstr = ge...
java
private boolean checkIdentical(int start, int end) { if (strength_ != Collator.IDENTICAL) { return true; } // Note: We could use Normalizer::compare() or similar, but for short strings // which may not be in FCD it might be faster to just NFD them. String textstr = ge...
[ "private", "boolean", "checkIdentical", "(", "int", "start", ",", "int", "end", ")", "{", "if", "(", "strength_", "!=", "Collator", ".", "IDENTICAL", ")", "{", "return", "true", ";", "}", "// Note: We could use Normalizer::compare() or similar, but for short strings",...
Checks for identical match @param start offset of possible match @param end offset of possible match @return TRUE if identical match is found
[ "Checks", "for", "identical", "match" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java#L856-L871
35,303
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java
StringSearch.getString
private static final String getString(CharacterIterator text, int start, int length) { StringBuilder result = new StringBuilder(length); int offset = text.getIndex(); text.setIndex(start); for (int i = 0; i < length; i++) { result.append(text.current()); text.next...
java
private static final String getString(CharacterIterator text, int start, int length) { StringBuilder result = new StringBuilder(length); int offset = text.getIndex(); text.setIndex(start); for (int i = 0; i < length; i++) { result.append(text.current()); text.next...
[ "private", "static", "final", "String", "getString", "(", "CharacterIterator", "text", ",", "int", "start", ",", "int", "length", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", "length", ")", ";", "int", "offset", "=", "text", ".", ...
Gets a substring out of a CharacterIterator Java porting note: Not available in ICU4C @param text CharacterIterator @param start start offset @param length of substring @return substring from text starting at start and length length
[ "Gets", "a", "substring", "out", "of", "a", "CharacterIterator" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java#L1580-L1590
35,304
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneNamesImpl.java
TimeZoneNamesImpl.addAllNamesIntoTrie
private void addAllNamesIntoTrie() { for (Map.Entry<String, ZNames> entry : _tzNamesMap.entrySet()) { entry.getValue().addAsTimeZoneIntoTrie(entry.getKey(), _namesTrie); } for (Map.Entry<String, ZNames> entry : _mzNamesMap.entrySet()) { entry.getValue().addAsMetaZoneIntoT...
java
private void addAllNamesIntoTrie() { for (Map.Entry<String, ZNames> entry : _tzNamesMap.entrySet()) { entry.getValue().addAsTimeZoneIntoTrie(entry.getKey(), _namesTrie); } for (Map.Entry<String, ZNames> entry : _mzNamesMap.entrySet()) { entry.getValue().addAsMetaZoneIntoT...
[ "private", "void", "addAllNamesIntoTrie", "(", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "ZNames", ">", "entry", ":", "_tzNamesMap", ".", "entrySet", "(", ")", ")", "{", "entry", ".", "getValue", "(", ")", ".", "addAsTimeZoneIntoTrie...
Caller must synchronize.
[ "Caller", "must", "synchronize", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneNamesImpl.java#L296-L303
35,305
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneNamesImpl.java
TimeZoneNamesImpl.initialize
private void initialize(ULocale locale) { ICUResourceBundle bundle = (ICUResourceBundle)ICUResourceBundle.getBundleInstance( ICUData.ICU_ZONE_BASE_NAME, locale); _zoneStrings = (ICUResourceBundle)bundle.get(ZONE_STRINGS_BUNDLE); // TODO: Access is synchronized, can we use a non-...
java
private void initialize(ULocale locale) { ICUResourceBundle bundle = (ICUResourceBundle)ICUResourceBundle.getBundleInstance( ICUData.ICU_ZONE_BASE_NAME, locale); _zoneStrings = (ICUResourceBundle)bundle.get(ZONE_STRINGS_BUNDLE); // TODO: Access is synchronized, can we use a non-...
[ "private", "void", "initialize", "(", "ULocale", "locale", ")", "{", "ICUResourceBundle", "bundle", "=", "(", "ICUResourceBundle", ")", "ICUResourceBundle", ".", "getBundleInstance", "(", "ICUData", ".", "ICU_ZONE_BASE_NAME", ",", "locale", ")", ";", "_zoneStrings",...
Initialize the transient fields, called from the constructor and readObject. @param locale The locale
[ "Initialize", "the", "transient", "fields", "called", "from", "the", "constructor", "and", "readObject", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneNamesImpl.java#L420-L439
35,306
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneNamesImpl.java
TimeZoneNamesImpl.loadStrings
private synchronized void loadStrings(String tzCanonicalID) { if (tzCanonicalID == null || tzCanonicalID.length() == 0) { return; } loadTimeZoneNames(tzCanonicalID); Set<String> mzIDs = getAvailableMetaZoneIDs(tzCanonicalID); for (String mzID : mzIDs) { l...
java
private synchronized void loadStrings(String tzCanonicalID) { if (tzCanonicalID == null || tzCanonicalID.length() == 0) { return; } loadTimeZoneNames(tzCanonicalID); Set<String> mzIDs = getAvailableMetaZoneIDs(tzCanonicalID); for (String mzID : mzIDs) { l...
[ "private", "synchronized", "void", "loadStrings", "(", "String", "tzCanonicalID", ")", "{", "if", "(", "tzCanonicalID", "==", "null", "||", "tzCanonicalID", ".", "length", "(", ")", "==", "0", ")", "{", "return", ";", "}", "loadTimeZoneNames", "(", "tzCanoni...
Load all strings used by the specified time zone. This is called from the initializer to load default zone's strings. @param tzCanonicalID the canonical time zone ID
[ "Load", "all", "strings", "used", "by", "the", "specified", "time", "zone", ".", "This", "is", "called", "from", "the", "initializer", "to", "load", "default", "zone", "s", "strings", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneNamesImpl.java#L447-L457
35,307
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneNamesImpl.java
TimeZoneNamesImpl.loadMetaZoneNames
private synchronized ZNames loadMetaZoneNames(String mzID) { ZNames mznames = _mzNamesMap.get(mzID); if (mznames == null) { ZNamesLoader loader = new ZNamesLoader(); loader.loadMetaZone(_zoneStrings, mzID); mznames = ZNames.createMetaZoneAndPutInCache(_mzNamesMap, loa...
java
private synchronized ZNames loadMetaZoneNames(String mzID) { ZNames mznames = _mzNamesMap.get(mzID); if (mznames == null) { ZNamesLoader loader = new ZNamesLoader(); loader.loadMetaZone(_zoneStrings, mzID); mznames = ZNames.createMetaZoneAndPutInCache(_mzNamesMap, loa...
[ "private", "synchronized", "ZNames", "loadMetaZoneNames", "(", "String", "mzID", ")", "{", "ZNames", "mznames", "=", "_mzNamesMap", ".", "get", "(", "mzID", ")", ";", "if", "(", "mznames", "==", "null", ")", "{", "ZNamesLoader", "loader", "=", "new", "ZNam...
Returns a set of names for the given meta zone ID. This method loads the set of names into the internal map and trie for future references. @param mzID the meta zone ID @return An instance of ZNames that includes a set of meta zone display names.
[ "Returns", "a", "set", "of", "names", "for", "the", "given", "meta", "zone", "ID", ".", "This", "method", "loads", "the", "set", "of", "names", "into", "the", "internal", "map", "and", "trie", "for", "future", "references", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneNamesImpl.java#L483-L491
35,308
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneNamesImpl.java
TimeZoneNamesImpl.loadTimeZoneNames
private synchronized ZNames loadTimeZoneNames(String tzID) { ZNames tznames = _tzNamesMap.get(tzID); if (tznames == null) { ZNamesLoader loader = new ZNamesLoader(); loader.loadTimeZone(_zoneStrings, tzID); tznames = ZNames.createTimeZoneAndPutInCache(_tzNamesMap, loa...
java
private synchronized ZNames loadTimeZoneNames(String tzID) { ZNames tznames = _tzNamesMap.get(tzID); if (tznames == null) { ZNamesLoader loader = new ZNamesLoader(); loader.loadTimeZone(_zoneStrings, tzID); tznames = ZNames.createTimeZoneAndPutInCache(_tzNamesMap, loa...
[ "private", "synchronized", "ZNames", "loadTimeZoneNames", "(", "String", "tzID", ")", "{", "ZNames", "tznames", "=", "_tzNamesMap", ".", "get", "(", "tzID", ")", ";", "if", "(", "tznames", "==", "null", ")", "{", "ZNamesLoader", "loader", "=", "new", "ZNam...
Returns a set of names for the given time zone ID. This method loads the set of names into the internal map and trie for future references. @param tzID the canonical time zone ID @return An instance of ZNames that includes a set of time zone display names.
[ "Returns", "a", "set", "of", "names", "for", "the", "given", "time", "zone", "ID", ".", "This", "method", "loads", "the", "set", "of", "names", "into", "the", "internal", "map", "and", "trie", "for", "future", "references", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneNamesImpl.java#L499-L507
35,309
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationSettings.java
CollationSettings.setStrength
public void setStrength(int value) { int noStrength = options & ~STRENGTH_MASK; switch(value) { case Collator.PRIMARY: case Collator.SECONDARY: case Collator.TERTIARY: case Collator.QUATERNARY: case Collator.IDENTICAL: options = noStrength | (value << ...
java
public void setStrength(int value) { int noStrength = options & ~STRENGTH_MASK; switch(value) { case Collator.PRIMARY: case Collator.SECONDARY: case Collator.TERTIARY: case Collator.QUATERNARY: case Collator.IDENTICAL: options = noStrength | (value << ...
[ "public", "void", "setStrength", "(", "int", "value", ")", "{", "int", "noStrength", "=", "options", "&", "~", "STRENGTH_MASK", ";", "switch", "(", "value", ")", "{", "case", "Collator", ".", "PRIMARY", ":", "case", "Collator", ".", "SECONDARY", ":", "ca...
except that this class uses bits in its own bit set for simple values.
[ "except", "that", "this", "class", "uses", "bits", "in", "its", "own", "bit", "set", "for", "simple", "values", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationSettings.java#L313-L326
35,310
google/j2objc
jre_emul/android/platform/external/okhttp/okio/okio/src/main/java/okio/Buffer.java
Buffer.completeSegmentByteCount
public long completeSegmentByteCount() { long result = size; if (result == 0) return 0; // Omit the tail if it's still writable. Segment tail = head.prev; if (tail.limit < Segment.SIZE && tail.owner) { result -= tail.limit - tail.pos; } return result; }
java
public long completeSegmentByteCount() { long result = size; if (result == 0) return 0; // Omit the tail if it's still writable. Segment tail = head.prev; if (tail.limit < Segment.SIZE && tail.owner) { result -= tail.limit - tail.pos; } return result; }
[ "public", "long", "completeSegmentByteCount", "(", ")", "{", "long", "result", "=", "size", ";", "if", "(", "result", "==", "0", ")", "return", "0", ";", "// Omit the tail if it's still writable.", "Segment", "tail", "=", "head", ".", "prev", ";", "if", "(",...
Returns the number of bytes in segments that are not writable. This is the number of bytes that can be flushed immediately to an underlying sink without harming throughput.
[ "Returns", "the", "number", "of", "bytes", "in", "segments", "that", "are", "not", "writable", ".", "This", "is", "the", "number", "of", "bytes", "that", "can", "be", "flushed", "immediately", "to", "an", "underlying", "sink", "without", "harming", "throughp...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/okhttp/okio/okio/src/main/java/okio/Buffer.java#L257-L268
35,311
google/j2objc
jre_emul/android/platform/external/okhttp/okio/okio/src/main/java/okio/Buffer.java
Buffer.segmentSizes
List<Integer> segmentSizes() { if (head == null) return Collections.emptyList(); List<Integer> result = new ArrayList<>(); result.add(head.limit - head.pos); for (Segment s = head.next; s != head; s = s.next) { result.add(s.limit - s.pos); } return result; }
java
List<Integer> segmentSizes() { if (head == null) return Collections.emptyList(); List<Integer> result = new ArrayList<>(); result.add(head.limit - head.pos); for (Segment s = head.next; s != head; s = s.next) { result.add(s.limit - s.pos); } return result; }
[ "List", "<", "Integer", ">", "segmentSizes", "(", ")", "{", "if", "(", "head", "==", "null", ")", "return", "Collections", ".", "emptyList", "(", ")", ";", "List", "<", "Integer", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "result",...
For testing. This returns the sizes of the segments in this buffer.
[ "For", "testing", ".", "This", "returns", "the", "sizes", "of", "the", "segments", "in", "this", "buffer", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/okhttp/okio/okio/src/main/java/okio/Buffer.java#L1327-L1335
35,312
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java
Provider.entrySet
public synchronized Set<Map.Entry<Object,Object>> entrySet() { checkInitialized(); if (entrySet == null) { if (entrySetCallCount++ == 0) // Initial call entrySet = Collections.unmodifiableMap(this).entrySet(); else return super.entrySet(); // Re...
java
public synchronized Set<Map.Entry<Object,Object>> entrySet() { checkInitialized(); if (entrySet == null) { if (entrySetCallCount++ == 0) // Initial call entrySet = Collections.unmodifiableMap(this).entrySet(); else return super.entrySet(); // Re...
[ "public", "synchronized", "Set", "<", "Map", ".", "Entry", "<", "Object", ",", "Object", ">", ">", "entrySet", "(", ")", "{", "checkInitialized", "(", ")", ";", "if", "(", "entrySet", "==", "null", ")", "{", "if", "(", "entrySetCallCount", "++", "==", ...
Returns an unmodifiable Set view of the property entries contained in this Provider. @see java.util.Map.Entry @since 1.2
[ "Returns", "an", "unmodifiable", "Set", "view", "of", "the", "property", "entries", "contained", "in", "this", "Provider", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java#L261-L279
35,313
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java
Provider.putId
private void putId() { // note: name and info may be null super.put("Provider.id name", String.valueOf(name)); super.put("Provider.id version", String.valueOf(version)); super.put("Provider.id info", String.valueOf(info)); super.put("Provider.id className", this.getClass().getNam...
java
private void putId() { // note: name and info may be null super.put("Provider.id name", String.valueOf(name)); super.put("Provider.id version", String.valueOf(version)); super.put("Provider.id info", String.valueOf(info)); super.put("Provider.id className", this.getClass().getNam...
[ "private", "void", "putId", "(", ")", "{", "// note: name and info may be null", "super", ".", "put", "(", "\"Provider.id name\"", ",", "String", ".", "valueOf", "(", "name", ")", ")", ";", "super", ".", "put", "(", "\"Provider.id version\"", ",", "String", "....
report to different provider objects as the same
[ "report", "to", "different", "provider", "objects", "as", "the", "same" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java#L445-L451
35,314
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java
Provider.implPutAll
private void implPutAll(Map t) { for (Map.Entry e : ((Map<?,?>)t).entrySet()) { implPut(e.getKey(), e.getValue()); } if (registered) { Security.increaseVersion(); } }
java
private void implPutAll(Map t) { for (Map.Entry e : ((Map<?,?>)t).entrySet()) { implPut(e.getKey(), e.getValue()); } if (registered) { Security.increaseVersion(); } }
[ "private", "void", "implPutAll", "(", "Map", "t", ")", "{", "for", "(", "Map", ".", "Entry", "e", ":", "(", "(", "Map", "<", "?", ",", "?", ">", ")", "t", ")", ".", "entrySet", "(", ")", ")", "{", "implPut", "(", "e", ".", "getKey", "(", ")...
Copies all of the mappings from the specified Map to this provider. Internal method to be called AFTER the security check has been performed.
[ "Copies", "all", "of", "the", "mappings", "from", "the", "specified", "Map", "to", "this", "provider", ".", "Internal", "method", "to", "be", "called", "AFTER", "the", "security", "check", "has", "been", "performed", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java#L472-L479
35,315
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java
Provider.ensureLegacyParsed
private void ensureLegacyParsed() { if ((legacyChanged == false) || (legacyStrings == null)) { return; } serviceSet = null; if (legacyMap == null) { legacyMap = new LinkedHashMap<ServiceKey,Service>(); } else { legacyMap.clear(); } ...
java
private void ensureLegacyParsed() { if ((legacyChanged == false) || (legacyStrings == null)) { return; } serviceSet = null; if (legacyMap == null) { legacyMap = new LinkedHashMap<ServiceKey,Service>(); } else { legacyMap.clear(); } ...
[ "private", "void", "ensureLegacyParsed", "(", ")", "{", "if", "(", "(", "legacyChanged", "==", "false", ")", "||", "(", "legacyStrings", "==", "null", ")", ")", "{", "return", ";", "}", "serviceSet", "=", "null", ";", "if", "(", "legacyMap", "==", "nul...
Ensure all the legacy String properties are fully parsed into service objects.
[ "Ensure", "all", "the", "legacy", "String", "properties", "are", "fully", "parsed", "into", "service", "objects", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java#L571-L586
35,316
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java
Provider.removeInvalidServices
private void removeInvalidServices(Map<ServiceKey,Service> map) { for (Iterator t = map.entrySet().iterator(); t.hasNext(); ) { Map.Entry entry = (Map.Entry)t.next(); Service s = (Service)entry.getValue(); if (s.isValid() == false) { t.remove(); } ...
java
private void removeInvalidServices(Map<ServiceKey,Service> map) { for (Iterator t = map.entrySet().iterator(); t.hasNext(); ) { Map.Entry entry = (Map.Entry)t.next(); Service s = (Service)entry.getValue(); if (s.isValid() == false) { t.remove(); } ...
[ "private", "void", "removeInvalidServices", "(", "Map", "<", "ServiceKey", ",", "Service", ">", "map", ")", "{", "for", "(", "Iterator", "t", "=", "map", ".", "entrySet", "(", ")", ".", "iterator", "(", ")", ";", "t", ".", "hasNext", "(", ")", ";", ...
Remove all invalid services from the Map. Invalid services can only occur if the legacy properties are inconsistent or incomplete.
[ "Remove", "all", "invalid", "services", "from", "the", "Map", ".", "Invalid", "services", "can", "only", "occur", "if", "the", "legacy", "properties", "are", "inconsistent", "or", "incomplete", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java#L592-L600
35,317
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java
Provider.getServices
public synchronized Set<Service> getServices() { checkInitialized(); if (legacyChanged || servicesChanged) { serviceSet = null; } if (serviceSet == null) { ensureLegacyParsed(); Set<Service> set = new LinkedHashSet<>(); if (serviceMap != nu...
java
public synchronized Set<Service> getServices() { checkInitialized(); if (legacyChanged || servicesChanged) { serviceSet = null; } if (serviceSet == null) { ensureLegacyParsed(); Set<Service> set = new LinkedHashSet<>(); if (serviceMap != nu...
[ "public", "synchronized", "Set", "<", "Service", ">", "getServices", "(", ")", "{", "checkInitialized", "(", ")", ";", "if", "(", "legacyChanged", "||", "servicesChanged", ")", "{", "serviceSet", "=", "null", ";", "}", "if", "(", "serviceSet", "==", "null"...
Get an unmodifiable Set of all services supported by this Provider. @return an unmodifiable Set of all services supported by this Provider @since 1.5
[ "Get", "an", "unmodifiable", "Set", "of", "all", "services", "supported", "by", "this", "Provider", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java#L743-L761
35,318
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java
Provider.putPropertyStrings
private void putPropertyStrings(Service s) { String type = s.getType(); String algorithm = s.getAlgorithm(); // use super() to avoid permission check and other processing super.put(type + "." + algorithm, s.getClassName()); for (String alias : s.getAliases()) { super....
java
private void putPropertyStrings(Service s) { String type = s.getType(); String algorithm = s.getAlgorithm(); // use super() to avoid permission check and other processing super.put(type + "." + algorithm, s.getClassName()); for (String alias : s.getAliases()) { super....
[ "private", "void", "putPropertyStrings", "(", "Service", "s", ")", "{", "String", "type", "=", "s", ".", "getType", "(", ")", ";", "String", "algorithm", "=", "s", ".", "getAlgorithm", "(", ")", ";", "// use super() to avoid permission check and other processing",...
Put the string properties for this Service in this Provider's Hashtable.
[ "Put", "the", "string", "properties", "for", "this", "Service", "in", "this", "Provider", "s", "Hashtable", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java#L824-L839
35,319
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java
Provider.removePropertyStrings
private void removePropertyStrings(Service s) { String type = s.getType(); String algorithm = s.getAlgorithm(); // use super() to avoid permission check and other processing super.remove(type + "." + algorithm); for (String alias : s.getAliases()) { super.remove(ALIAS...
java
private void removePropertyStrings(Service s) { String type = s.getType(); String algorithm = s.getAlgorithm(); // use super() to avoid permission check and other processing super.remove(type + "." + algorithm); for (String alias : s.getAliases()) { super.remove(ALIAS...
[ "private", "void", "removePropertyStrings", "(", "Service", "s", ")", "{", "String", "type", "=", "s", ".", "getType", "(", ")", ";", "String", "algorithm", "=", "s", ".", "getAlgorithm", "(", ")", ";", "// use super() to avoid permission check and other processin...
Remove the string properties for this Service from this Provider's Hashtable.
[ "Remove", "the", "string", "properties", "for", "this", "Service", "from", "this", "Provider", "s", "Hashtable", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Provider.java#L845-L860
35,320
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/IntPipeline.java
IntPipeline.asLongStream
@Override public final LongStream asLongStream() { return new LongPipeline.StatelessOp<Integer>(this, StreamShape.INT_VALUE, StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) { @Override public Sink<Integer> opWrapSink(int flags...
java
@Override public final LongStream asLongStream() { return new LongPipeline.StatelessOp<Integer>(this, StreamShape.INT_VALUE, StreamOpFlag.NOT_SORTED | StreamOpFlag.NOT_DISTINCT) { @Override public Sink<Integer> opWrapSink(int flags...
[ "@", "Override", "public", "final", "LongStream", "asLongStream", "(", ")", "{", "return", "new", "LongPipeline", ".", "StatelessOp", "<", "Integer", ">", "(", "this", ",", "StreamShape", ".", "INT_VALUE", ",", "StreamOpFlag", ".", "NOT_SORTED", "|", "StreamOp...
Stateless intermediate ops from IntStream
[ "Stateless", "intermediate", "ops", "from", "IntStream" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/IntPipeline.java#L187-L201
35,321
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/IntPipeline.java
IntPipeline.limit
@Override public final IntStream limit(long maxSize) { if (maxSize < 0) throw new IllegalArgumentException(Long.toString(maxSize)); return SliceOps.makeInt(this, 0, maxSize); }
java
@Override public final IntStream limit(long maxSize) { if (maxSize < 0) throw new IllegalArgumentException(Long.toString(maxSize)); return SliceOps.makeInt(this, 0, maxSize); }
[ "@", "Override", "public", "final", "IntStream", "limit", "(", "long", "maxSize", ")", "{", "if", "(", "maxSize", "<", "0", ")", "throw", "new", "IllegalArgumentException", "(", "Long", ".", "toString", "(", "maxSize", ")", ")", ";", "return", "SliceOps", ...
Stateful intermediate ops from IntStream
[ "Stateful", "intermediate", "ops", "from", "IntStream" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/IntPipeline.java#L372-L377
35,322
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/ObjectPool.java
ObjectPool.getInstanceIfFree
public synchronized Object getInstanceIfFree() { // Check if the pool is empty. if (!freeStack.isEmpty()) { // Remove object from end of free pool. Object result = freeStack.remove(freeStack.size() - 1); return result; } return null; }
java
public synchronized Object getInstanceIfFree() { // Check if the pool is empty. if (!freeStack.isEmpty()) { // Remove object from end of free pool. Object result = freeStack.remove(freeStack.size() - 1); return result; } return null; }
[ "public", "synchronized", "Object", "getInstanceIfFree", "(", ")", "{", "// Check if the pool is empty.", "if", "(", "!", "freeStack", ".", "isEmpty", "(", ")", ")", "{", "// Remove object from end of free pool.", "Object", "result", "=", "freeStack", ".", "remove", ...
Get an instance of the given object in this pool if available @return an instance of the given object if available or null
[ "Get", "an", "instance", "of", "the", "given", "object", "in", "this", "pool", "if", "available" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/ObjectPool.java#L105-L118
35,323
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemWithParam.java
ElemWithParam.getValue
public XObject getValue(TransformerImpl transformer, int sourceNode) throws TransformerException { XObject var; XPathContext xctxt = transformer.getXPathContext(); xctxt.pushCurrentNode(sourceNode); try { if (null != m_selectPattern) { var = m_selectPattern.execute...
java
public XObject getValue(TransformerImpl transformer, int sourceNode) throws TransformerException { XObject var; XPathContext xctxt = transformer.getXPathContext(); xctxt.pushCurrentNode(sourceNode); try { if (null != m_selectPattern) { var = m_selectPattern.execute...
[ "public", "XObject", "getValue", "(", "TransformerImpl", "transformer", ",", "int", "sourceNode", ")", "throws", "TransformerException", "{", "XObject", "var", ";", "XPathContext", "xctxt", "=", "transformer", ".", "getXPathContext", "(", ")", ";", "xctxt", ".", ...
Get the XObject representation of the variable. @param transformer non-null reference to the the current transform-time state. @param sourceNode non-null reference to the <a href="http://www.w3.org/TR/xslt#dt-current-node">current source node</a>. @return the XObject representation of the variable. @throws Transform...
[ "Get", "the", "XObject", "representation", "of", "the", "variable", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemWithParam.java#L190-L226
35,324
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRuleSet.java
NFRuleSet.parseRules
public void parseRules(String description) { // (the number of elements in the description list isn't necessarily // the number of rules-- some descriptions may expend into two rules) List<NFRule> tempRules = new ArrayList<NFRule>(); // we keep track of the rule before the one we're cur...
java
public void parseRules(String description) { // (the number of elements in the description list isn't necessarily // the number of rules-- some descriptions may expend into two rules) List<NFRule> tempRules = new ArrayList<NFRule>(); // we keep track of the rule before the one we're cur...
[ "public", "void", "parseRules", "(", "String", "description", ")", "{", "// (the number of elements in the description list isn't necessarily", "// the number of rules-- some descriptions may expend into two rules)", "List", "<", "NFRule", ">", "tempRules", "=", "new", "ArrayList",...
Construct the subordinate data structures used by this object. This function is called by the RuleBasedNumberFormat constructor after all the rule sets have been created to actually parse the description and build rules from it. Since any rule set can refer to any other rule set, we have to have created all of them be...
[ "Construct", "the", "subordinate", "data", "structures", "used", "by", "this", "object", ".", "This", "function", "is", "called", "by", "the", "RuleBasedNumberFormat", "constructor", "after", "all", "the", "rule", "sets", "have", "been", "created", "to", "actual...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRuleSet.java#L163-L232
35,325
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRuleSet.java
NFRuleSet.setNonNumericalRule
void setNonNumericalRule(NFRule rule) { long baseValue = rule.getBaseValue(); if (baseValue == NFRule.NEGATIVE_NUMBER_RULE) { nonNumericalRules[NFRuleSet.NEGATIVE_RULE_INDEX] = rule; } else if (baseValue == NFRule.IMPROPER_FRACTION_RULE) { setBestFractionRule(NFRu...
java
void setNonNumericalRule(NFRule rule) { long baseValue = rule.getBaseValue(); if (baseValue == NFRule.NEGATIVE_NUMBER_RULE) { nonNumericalRules[NFRuleSet.NEGATIVE_RULE_INDEX] = rule; } else if (baseValue == NFRule.IMPROPER_FRACTION_RULE) { setBestFractionRule(NFRu...
[ "void", "setNonNumericalRule", "(", "NFRule", "rule", ")", "{", "long", "baseValue", "=", "rule", ".", "getBaseValue", "(", ")", ";", "if", "(", "baseValue", "==", "NFRule", ".", "NEGATIVE_NUMBER_RULE", ")", "{", "nonNumericalRules", "[", "NFRuleSet", ".", "...
Set one of the non-numerical rules. @param rule The rule to set.
[ "Set", "one", "of", "the", "non", "-", "numerical", "rules", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRuleSet.java#L238-L258
35,326
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRuleSet.java
NFRuleSet.setBestFractionRule
private void setBestFractionRule(int originalIndex, NFRule newRule, boolean rememberRule) { if (rememberRule) { if (fractionRules == null) { fractionRules = new LinkedList<NFRule>(); } fractionRules.add(newRule); } NFRule bestResult = nonNumeri...
java
private void setBestFractionRule(int originalIndex, NFRule newRule, boolean rememberRule) { if (rememberRule) { if (fractionRules == null) { fractionRules = new LinkedList<NFRule>(); } fractionRules.add(newRule); } NFRule bestResult = nonNumeri...
[ "private", "void", "setBestFractionRule", "(", "int", "originalIndex", ",", "NFRule", "newRule", ",", "boolean", "rememberRule", ")", "{", "if", "(", "rememberRule", ")", "{", "if", "(", "fractionRules", "==", "null", ")", "{", "fractionRules", "=", "new", "...
Determine the best fraction rule to use. Rules matching the decimal point from DecimalFormatSymbols become the main set of rules to use. @param originalIndex The index into nonNumericalRules @param newRule The new rule to consider @param rememberRule Should the new rule be added to fractionRules.
[ "Determine", "the", "best", "fraction", "rule", "to", "use", ".", "Rules", "matching", "the", "decimal", "point", "from", "DecimalFormatSymbols", "become", "the", "main", "set", "of", "rules", "to", "use", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRuleSet.java#L267-L286
35,327
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRuleSet.java
NFRuleSet.format
public void format(long number, StringBuilder toInsertInto, int pos, int recursionCount) { if (recursionCount >= RECURSION_LIMIT) { throw new IllegalStateException("Recursion limit exceeded when applying ruleSet " + name); } NFRule applicableRule = findNormalRule(number); app...
java
public void format(long number, StringBuilder toInsertInto, int pos, int recursionCount) { if (recursionCount >= RECURSION_LIMIT) { throw new IllegalStateException("Recursion limit exceeded when applying ruleSet " + name); } NFRule applicableRule = findNormalRule(number); app...
[ "public", "void", "format", "(", "long", "number", ",", "StringBuilder", "toInsertInto", ",", "int", "pos", ",", "int", "recursionCount", ")", "{", "if", "(", "recursionCount", ">=", "RECURSION_LIMIT", ")", "{", "throw", "new", "IllegalStateException", "(", "\...
Formats a long. Selects an appropriate rule and dispatches control to it. @param number The number being formatted @param toInsertInto The string where the result is to be placed @param pos The position in toInsertInto where the result of this operation is to be inserted
[ "Formats", "a", "long", ".", "Selects", "an", "appropriate", "rule", "and", "dispatches", "control", "to", "it", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRuleSet.java#L436-L442
35,328
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRuleSet.java
NFRuleSet.findRule
NFRule findRule(double number) { // if this is a fraction rule set, use findFractionRuleSetRule() if (isFractionRuleSet) { return findFractionRuleSetRule(number); } if (Double.isNaN(number)) { NFRule rule = nonNumericalRules[NAN_RULE_INDEX]; if (rule ...
java
NFRule findRule(double number) { // if this is a fraction rule set, use findFractionRuleSetRule() if (isFractionRuleSet) { return findFractionRuleSetRule(number); } if (Double.isNaN(number)) { NFRule rule = nonNumericalRules[NAN_RULE_INDEX]; if (rule ...
[ "NFRule", "findRule", "(", "double", "number", ")", "{", "// if this is a fraction rule set, use findFractionRuleSetRule()", "if", "(", "isFractionRuleSet", ")", "{", "return", "findFractionRuleSetRule", "(", "number", ")", ";", "}", "if", "(", "Double", ".", "isNaN",...
Selects an appropriate rule for formatting the number. @param number The number being formatted. @return The rule that should be used to format it
[ "Selects", "an", "appropriate", "rule", "for", "formatting", "the", "number", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRuleSet.java#L465-L520
35,329
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRuleSet.java
NFRuleSet.lcm
private static long lcm(long x, long y) { // binary gcd algorithm from Knuth, "The Art of Computer Programming," // vol. 2, 1st ed., pp. 298-299 long x1 = x; long y1 = y; int p2 = 0; while ((x1 & 1) == 0 && (y1 & 1) == 0) { ++p2; x1 >>= 1; ...
java
private static long lcm(long x, long y) { // binary gcd algorithm from Knuth, "The Art of Computer Programming," // vol. 2, 1st ed., pp. 298-299 long x1 = x; long y1 = y; int p2 = 0; while ((x1 & 1) == 0 && (y1 & 1) == 0) { ++p2; x1 >>= 1; ...
[ "private", "static", "long", "lcm", "(", "long", "x", ",", "long", "y", ")", "{", "// binary gcd algorithm from Knuth, \"The Art of Computer Programming,\"", "// vol. 2, 1st ed., pp. 298-299", "long", "x1", "=", "x", ";", "long", "y1", "=", "y", ";", "int", "p2", ...
Calculates the least common multiple of x and y.
[ "Calculates", "the", "least", "common", "multiple", "of", "x", "and", "y", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFRuleSet.java#L692-L727
35,330
google/j2objc
translator/src/main/java/com/google/devtools/j2objc/util/Version.java
Version.jarVersion
public static String jarVersion(Class<?> jarClass) { String j2objcVersion = null; String path = jarClass.getProtectionDomain().getCodeSource().getLocation().getPath(); try (JarFile jar = new JarFile(URLDecoder.decode(path, "UTF-8"))) { Manifest manifest = jar.getManifest(); j2objcVersion = mani...
java
public static String jarVersion(Class<?> jarClass) { String j2objcVersion = null; String path = jarClass.getProtectionDomain().getCodeSource().getLocation().getPath(); try (JarFile jar = new JarFile(URLDecoder.decode(path, "UTF-8"))) { Manifest manifest = jar.getManifest(); j2objcVersion = mani...
[ "public", "static", "String", "jarVersion", "(", "Class", "<", "?", ">", "jarClass", ")", "{", "String", "j2objcVersion", "=", "null", ";", "String", "path", "=", "jarClass", ".", "getProtectionDomain", "(", ")", ".", "getCodeSource", "(", ")", ".", "getLo...
Returns the "version" entry from a jar file's manifest, if available. If the class isn't in a jar file, or that jar file doesn't define a "version" entry, then a "not available" string is returned. @param jarClass any class from the target jar
[ "Returns", "the", "version", "entry", "from", "a", "jar", "file", "s", "manifest", "if", "available", ".", "If", "the", "class", "isn", "t", "in", "a", "jar", "file", "or", "that", "jar", "file", "doesn", "t", "define", "a", "version", "entry", "then",...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/Version.java#L31-L47
35,331
google/j2objc
translator/src/main/java/com/google/devtools/j2objc/translate/Rewriter.java
Rewriter.endVisit
@Override public void endVisit(PropertyAnnotation node) { FieldDeclaration field = (FieldDeclaration) node.getParent(); TypeMirror fieldType = field.getTypeMirror(); String getter = node.getGetter(); String setter = node.getSetter(); if (field.getFragments().size() > 1) { if (getter != null)...
java
@Override public void endVisit(PropertyAnnotation node) { FieldDeclaration field = (FieldDeclaration) node.getParent(); TypeMirror fieldType = field.getTypeMirror(); String getter = node.getGetter(); String setter = node.getSetter(); if (field.getFragments().size() > 1) { if (getter != null)...
[ "@", "Override", "public", "void", "endVisit", "(", "PropertyAnnotation", "node", ")", "{", "FieldDeclaration", "field", "=", "(", "FieldDeclaration", ")", "node", ".", "getParent", "(", ")", ";", "TypeMirror", "fieldType", "=", "field", ".", "getTypeMirror", ...
Make sure attempt isn't made to specify an accessor method for fields with multiple fragments, since each variable needs unique accessors.
[ "Make", "sure", "attempt", "isn", "t", "made", "to", "specify", "an", "accessor", "method", "for", "fields", "with", "multiple", "fragments", "since", "each", "variable", "needs", "unique", "accessors", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/Rewriter.java#L242-L272
35,332
google/j2objc
jre_emul/android/frameworks/base/core/java/android/util/ArraySet.java
ArraySet.contains
@Override public boolean contains(Object key) { return key == null ? (indexOfNull() >= 0) : (indexOf(key, key.hashCode()) >= 0); }
java
@Override public boolean contains(Object key) { return key == null ? (indexOfNull() >= 0) : (indexOf(key, key.hashCode()) >= 0); }
[ "@", "Override", "public", "boolean", "contains", "(", "Object", "key", ")", "{", "return", "key", "==", "null", "?", "(", "indexOfNull", "(", ")", ">=", "0", ")", ":", "(", "indexOf", "(", "key", ",", "key", ".", "hashCode", "(", ")", ")", ">=", ...
Check whether a value exists in the set. @param key The value to search for. @return Returns true if the value exists, else false.
[ "Check", "whether", "a", "value", "exists", "in", "the", "set", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/util/ArraySet.java#L292-L295
35,333
google/j2objc
jre_emul/android/frameworks/base/core/java/android/util/ArraySet.java
ArraySet.add
@Override public boolean add(E value) { final int hash; int index; if (value == null) { hash = 0; index = indexOfNull(); } else { hash = value.hashCode(); index = indexOf(value, hash); } if (index >= 0) { ret...
java
@Override public boolean add(E value) { final int hash; int index; if (value == null) { hash = 0; index = indexOfNull(); } else { hash = value.hashCode(); index = indexOf(value, hash); } if (index >= 0) { ret...
[ "@", "Override", "public", "boolean", "add", "(", "E", "value", ")", "{", "final", "int", "hash", ";", "int", "index", ";", "if", "(", "value", "==", "null", ")", "{", "hash", "=", "0", ";", "index", "=", "indexOfNull", "(", ")", ";", "}", "else"...
Adds the specified object to this set. The set is not modified if it already contains the object. @param value the object to add. @return {@code true} if this set is modified, {@code false} otherwise. @throws ClassCastException when the class of the object is inappropriate for this set.
[ "Adds", "the", "specified", "object", "to", "this", "set", ".", "The", "set", "is", "not", "modified", "if", "it", "already", "contains", "the", "object", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/util/ArraySet.java#L323-L369
35,334
google/j2objc
jre_emul/android/frameworks/base/core/java/android/util/ArraySet.java
ArraySet.remove
@Override public boolean remove(Object object) { int index = object == null ? indexOfNull() : indexOf(object, object.hashCode()); if (index >= 0) { removeAt(index); return true; } return false; }
java
@Override public boolean remove(Object object) { int index = object == null ? indexOfNull() : indexOf(object, object.hashCode()); if (index >= 0) { removeAt(index); return true; } return false; }
[ "@", "Override", "public", "boolean", "remove", "(", "Object", "object", ")", "{", "int", "index", "=", "object", "==", "null", "?", "indexOfNull", "(", ")", ":", "indexOf", "(", "object", ",", "object", ".", "hashCode", "(", ")", ")", ";", "if", "("...
Removes the specified object from this set. @param object the object to remove. @return {@code true} if this set was modified, {@code false} otherwise.
[ "Removes", "the", "specified", "object", "from", "this", "set", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/util/ArraySet.java#L397-L405
35,335
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java
DateIntervalFormat.format
public final StringBuffer format(Object obj, StringBuffer appendTo, FieldPosition fieldPosition) { if ( obj instanceof DateInterval ) { return format( (DateInterval)obj, appendTo, fieldPosition); } else { throw new IllegalArgumentException("Cannot format give...
java
public final StringBuffer format(Object obj, StringBuffer appendTo, FieldPosition fieldPosition) { if ( obj instanceof DateInterval ) { return format( (DateInterval)obj, appendTo, fieldPosition); } else { throw new IllegalArgumentException("Cannot format give...
[ "public", "final", "StringBuffer", "format", "(", "Object", "obj", ",", "StringBuffer", "appendTo", ",", "FieldPosition", "fieldPosition", ")", "{", "if", "(", "obj", "instanceof", "DateInterval", ")", "{", "return", "format", "(", "(", "DateInterval", ")", "o...
Format an object to produce a string. This method handles Formattable objects with a DateInterval type. If a the Formattable object type is not a DateInterval, IllegalArgumentException is thrown. @param obj The object to format. Must be a DateInterval. @param appendTo Output parameter to receive...
[ "Format", "an", "object", "to", "produce", "a", "string", ".", "This", "method", "handles", "Formattable", "objects", "with", "a", "DateInterval", "type", ".", "If", "a", "the", "Formattable", "object", "type", "is", "not", "a", "DateInterval", "IllegalArgumen...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java#L603-L612
35,336
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java
DateIntervalFormat.format
public final synchronized StringBuffer format(DateInterval dtInterval, StringBuffer appendTo, FieldPosition fieldPosition) { fFromCalendar.setTimeInMillis(dtInterval.getFromDate()); fToCalendar.setTimeInMillis(dtInterval.getTo...
java
public final synchronized StringBuffer format(DateInterval dtInterval, StringBuffer appendTo, FieldPosition fieldPosition) { fFromCalendar.setTimeInMillis(dtInterval.getFromDate()); fToCalendar.setTimeInMillis(dtInterval.getTo...
[ "public", "final", "synchronized", "StringBuffer", "format", "(", "DateInterval", "dtInterval", ",", "StringBuffer", "appendTo", ",", "FieldPosition", "fieldPosition", ")", "{", "fFromCalendar", ".", "setTimeInMillis", "(", "dtInterval", ".", "getFromDate", "(", ")", ...
Format a DateInterval to produce a string. @param dtInterval DateInterval to be formatted. @param appendTo Output parameter to receive result. Result is appended to existing contents. @param fieldPosition On input: an alignment field, if desired. On output: the offsets of the alignment field. There...
[ "Format", "a", "DateInterval", "to", "produce", "a", "string", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java#L627-L634
35,337
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java
DateIntervalFormat.setDateIntervalInfo
public void setDateIntervalInfo(DateIntervalInfo newItvPattern) { // clone it. If it is frozen, the clone returns itself. // Otherwise, clone returns a copy fInfo = (DateIntervalInfo)newItvPattern.clone(); this.isDateIntervalInfoDefault = false; fInfo.freeze(); // freeze it ...
java
public void setDateIntervalInfo(DateIntervalInfo newItvPattern) { // clone it. If it is frozen, the clone returns itself. // Otherwise, clone returns a copy fInfo = (DateIntervalInfo)newItvPattern.clone(); this.isDateIntervalInfoDefault = false; fInfo.freeze(); // freeze it ...
[ "public", "void", "setDateIntervalInfo", "(", "DateIntervalInfo", "newItvPattern", ")", "{", "// clone it. If it is frozen, the clone returns itself.", "// Otherwise, clone returns a copy", "fInfo", "=", "(", "DateIntervalInfo", ")", "newItvPattern", ".", "clone", "(", ")", "...
Set the date time interval patterns. @param newItvPattern the given interval patterns to copy.
[ "Set", "the", "date", "time", "interval", "patterns", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java#L958-L968
35,338
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java
DateIntervalFormat.getTimeZone
public TimeZone getTimeZone() { if ( fDateFormat != null ) { // Here we clone, like other getters here, but unlike // DateFormat.getTimeZone() and Calendar.getTimeZone() // which return the TimeZone from the Calendar's zone variable return (TimeZone)(fDateForm...
java
public TimeZone getTimeZone() { if ( fDateFormat != null ) { // Here we clone, like other getters here, but unlike // DateFormat.getTimeZone() and Calendar.getTimeZone() // which return the TimeZone from the Calendar's zone variable return (TimeZone)(fDateForm...
[ "public", "TimeZone", "getTimeZone", "(", ")", "{", "if", "(", "fDateFormat", "!=", "null", ")", "{", "// Here we clone, like other getters here, but unlike", "// DateFormat.getTimeZone() and Calendar.getTimeZone()", "// which return the TimeZone from the Calendar's zone variable", "...
Get the TimeZone @return A copy of the TimeZone associated with this date interval formatter.
[ "Get", "the", "TimeZone" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java#L974-L984
35,339
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java
DateIntervalFormat.setTimeZone
public void setTimeZone(TimeZone zone) { // zone is cloned once for all three usages below: TimeZone zoneToSet = (TimeZone)zone.clone(); if (fDateFormat != null) { fDateFormat.setTimeZone(zoneToSet); } // fDateFormat has the master calendar for the DateIntervalFor...
java
public void setTimeZone(TimeZone zone) { // zone is cloned once for all three usages below: TimeZone zoneToSet = (TimeZone)zone.clone(); if (fDateFormat != null) { fDateFormat.setTimeZone(zoneToSet); } // fDateFormat has the master calendar for the DateIntervalFor...
[ "public", "void", "setTimeZone", "(", "TimeZone", "zone", ")", "{", "// zone is cloned once for all three usages below:", "TimeZone", "zoneToSet", "=", "(", "TimeZone", ")", "zone", ".", "clone", "(", ")", ";", "if", "(", "fDateFormat", "!=", "null", ")", "{", ...
Set the TimeZone for the calendar used by this DateIntervalFormat object. @param zone The new TimeZone, will be cloned for use by this DateIntervalFormat.
[ "Set", "the", "TimeZone", "for", "the", "calendar", "used", "by", "this", "DateIntervalFormat", "object", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java#L991-L1006
35,340
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java
DateIntervalFormat.getConcatenationPattern
private String getConcatenationPattern(ULocale locale) { ICUResourceBundle rb = (ICUResourceBundle) UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, locale); ICUResourceBundle dtPatternsRb = rb.getWithFallback("calendar/gregorian/DateTimePatterns"); ICUResourceBundle concatenationPattern...
java
private String getConcatenationPattern(ULocale locale) { ICUResourceBundle rb = (ICUResourceBundle) UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, locale); ICUResourceBundle dtPatternsRb = rb.getWithFallback("calendar/gregorian/DateTimePatterns"); ICUResourceBundle concatenationPattern...
[ "private", "String", "getConcatenationPattern", "(", "ULocale", "locale", ")", "{", "ICUResourceBundle", "rb", "=", "(", "ICUResourceBundle", ")", "UResourceBundle", ".", "getBundleInstance", "(", "ICUData", ".", "ICU_BASE_NAME", ",", "locale", ")", ";", "ICUResourc...
Retrieves the concatenation DateTime pattern from the resource bundle. @param locale Locale to retrieve. @return Concatenation DateTime pattern.
[ "Retrieves", "the", "concatenation", "DateTime", "pattern", "from", "the", "resource", "bundle", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateIntervalFormat.java#L1259-L1268
35,341
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/SortedSetRelation.java
SortedSetRelation.hasRelation
public static <T extends Object & Comparable<? super T>> boolean hasRelation(SortedSet<T> a, int allow, SortedSet<T> b) { if (allow < NONE || allow > ANY) { throw new IllegalArgumentException("Relation " + allow + " out of range"); } // extract filter conditions // t...
java
public static <T extends Object & Comparable<? super T>> boolean hasRelation(SortedSet<T> a, int allow, SortedSet<T> b) { if (allow < NONE || allow > ANY) { throw new IllegalArgumentException("Relation " + allow + " out of range"); } // extract filter conditions // t...
[ "public", "static", "<", "T", "extends", "Object", "&", "Comparable", "<", "?", "super", "T", ">", ">", "boolean", "hasRelation", "(", "SortedSet", "<", "T", ">", "a", ",", "int", "allow", ",", "SortedSet", "<", "T", ">", "b", ")", "{", "if", "(", ...
Utility that could be on SortedSet. Faster implementation than what is in Java for doing contains, equals, etc. @param a first set @param allow filter, using ANY, CONTAINS, etc. @param b second set @return whether the filter relationship is true or not.
[ "Utility", "that", "could", "be", "on", "SortedSet", ".", "Faster", "implementation", "than", "what", "is", "in", "Java", "for", "doing", "contains", "equals", "etc", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/SortedSetRelation.java#L74-L134
35,342
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadLocalRandom.java
ThreadLocalRandom.internalNextLong
final long internalNextLong(long origin, long bound) { long r = mix64(nextSeed()); if (origin < bound) { long n = bound - origin, m = n - 1; if ((n & m) == 0L) // power of two r = (r & m) + origin; else if (n > 0L) { // reject over-represented candid...
java
final long internalNextLong(long origin, long bound) { long r = mix64(nextSeed()); if (origin < bound) { long n = bound - origin, m = n - 1; if ((n & m) == 0L) // power of two r = (r & m) + origin; else if (n > 0L) { // reject over-represented candid...
[ "final", "long", "internalNextLong", "(", "long", "origin", ",", "long", "bound", ")", "{", "long", "r", "=", "mix64", "(", "nextSeed", "(", ")", ")", ";", "if", "(", "origin", "<", "bound", ")", "{", "long", "n", "=", "bound", "-", "origin", ",", ...
The form of nextLong used by LongStream Spliterators. If origin is greater than bound, acts as unbounded form of nextLong, else as bounded form. @param origin the least value, unless greater than bound @param bound the upper bound (exclusive), must not equal origin @return a pseudorandom value
[ "The", "form", "of", "nextLong", "used", "by", "LongStream", "Spliterators", ".", "If", "origin", "is", "greater", "than", "bound", "acts", "as", "unbounded", "form", "of", "nextLong", "else", "as", "bounded", "form", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadLocalRandom.java#L210-L229
35,343
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadLocalRandom.java
ThreadLocalRandom.internalNextInt
final int internalNextInt(int origin, int bound) { int r = mix32(nextSeed()); if (origin < bound) { int n = bound - origin, m = n - 1; if ((n & m) == 0) r = (r & m) + origin; else if (n > 0) { for (int u = r >>> 1; ...
java
final int internalNextInt(int origin, int bound) { int r = mix32(nextSeed()); if (origin < bound) { int n = bound - origin, m = n - 1; if ((n & m) == 0) r = (r & m) + origin; else if (n > 0) { for (int u = r >>> 1; ...
[ "final", "int", "internalNextInt", "(", "int", "origin", ",", "int", "bound", ")", "{", "int", "r", "=", "mix32", "(", "nextSeed", "(", ")", ")", ";", "if", "(", "origin", "<", "bound", ")", "{", "int", "n", "=", "bound", "-", "origin", ",", "m",...
The form of nextInt used by IntStream Spliterators. Exactly the same as long version, except for types. @param origin the least value, unless greater than bound @param bound the upper bound (exclusive), must not equal origin @return a pseudorandom value
[ "The", "form", "of", "nextInt", "used", "by", "IntStream", "Spliterators", ".", "Exactly", "the", "same", "as", "long", "version", "except", "for", "types", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadLocalRandom.java#L239-L258
35,344
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadLocalRandom.java
ThreadLocalRandom.internalNextDouble
final double internalNextDouble(double origin, double bound) { double r = (nextLong() >>> 11) * DOUBLE_UNIT; if (origin < bound) { r = r * (bound - origin) + origin; if (r >= bound) // correct for rounding r = Double.longBitsToDouble(Double.doubleToLongBits(bound)...
java
final double internalNextDouble(double origin, double bound) { double r = (nextLong() >>> 11) * DOUBLE_UNIT; if (origin < bound) { r = r * (bound - origin) + origin; if (r >= bound) // correct for rounding r = Double.longBitsToDouble(Double.doubleToLongBits(bound)...
[ "final", "double", "internalNextDouble", "(", "double", "origin", ",", "double", "bound", ")", "{", "double", "r", "=", "(", "nextLong", "(", ")", ">>>", "11", ")", "*", "DOUBLE_UNIT", ";", "if", "(", "origin", "<", "bound", ")", "{", "r", "=", "r", ...
The form of nextDouble used by DoubleStream Spliterators. @param origin the least value, unless greater than bound @param bound the upper bound (exclusive), must not equal origin @return a pseudorandom value
[ "The", "form", "of", "nextDouble", "used", "by", "DoubleStream", "Spliterators", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadLocalRandom.java#L267-L275
35,345
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java
Currency.getInstance
public static Currency getInstance(ULocale locale) { String currency = locale.getKeywordValue("currency"); if (currency != null) { return getInstance(currency); } if (shim == null) { return createCurrency(locale); } return shim.createInstance(loc...
java
public static Currency getInstance(ULocale locale) { String currency = locale.getKeywordValue("currency"); if (currency != null) { return getInstance(currency); } if (shim == null) { return createCurrency(locale); } return shim.createInstance(loc...
[ "public", "static", "Currency", "getInstance", "(", "ULocale", "locale", ")", "{", "String", "currency", "=", "locale", ".", "getKeywordValue", "(", "\"currency\"", ")", ";", "if", "(", "currency", "!=", "null", ")", "{", "return", "getInstance", "(", "curre...
Returns a currency object for the default currency in the given locale.
[ "Returns", "a", "currency", "object", "for", "the", "default", "currency", "in", "the", "given", "locale", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java#L157-L168
35,346
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java
Currency.getAvailableCurrencyCodes
public static String[] getAvailableCurrencyCodes(ULocale loc, Date d) { String region = ULocale.getRegionForSupplementalData(loc, false); CurrencyFilter filter = CurrencyFilter.onDate(d).withRegion(region); List<String> list = getTenderCurrencies(filter); // Note: Prior to 4.4 the spec d...
java
public static String[] getAvailableCurrencyCodes(ULocale loc, Date d) { String region = ULocale.getRegionForSupplementalData(loc, false); CurrencyFilter filter = CurrencyFilter.onDate(d).withRegion(region); List<String> list = getTenderCurrencies(filter); // Note: Prior to 4.4 the spec d...
[ "public", "static", "String", "[", "]", "getAvailableCurrencyCodes", "(", "ULocale", "loc", ",", "Date", "d", ")", "{", "String", "region", "=", "ULocale", ".", "getRegionForSupplementalData", "(", "loc", ",", "false", ")", ";", "CurrencyFilter", "filter", "="...
Returns an array of Strings which contain the currency identifiers that are valid for the given locale on the given date. If there are no such identifiers, returns null. Returned identifiers are in preference order. @param loc the locale for which to retrieve currency codes. @param d the date for which to retrieve cur...
[ "Returns", "an", "array", "of", "Strings", "which", "contain", "the", "currency", "identifiers", "that", "are", "valid", "for", "the", "given", "locale", "on", "the", "given", "date", ".", "If", "there", "are", "no", "such", "identifiers", "returns", "null",...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java#L179-L189
35,347
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java
Currency.getAvailableCurrencies
public static Set<Currency> getAvailableCurrencies() { CurrencyMetaInfo info = CurrencyMetaInfo.getInstance(); List<String> list = info.currencies(CurrencyFilter.all()); HashSet<Currency> resultSet = new HashSet<Currency>(list.size()); for (String code : list) { resultSet.add...
java
public static Set<Currency> getAvailableCurrencies() { CurrencyMetaInfo info = CurrencyMetaInfo.getInstance(); List<String> list = info.currencies(CurrencyFilter.all()); HashSet<Currency> resultSet = new HashSet<Currency>(list.size()); for (String code : list) { resultSet.add...
[ "public", "static", "Set", "<", "Currency", ">", "getAvailableCurrencies", "(", ")", "{", "CurrencyMetaInfo", "info", "=", "CurrencyMetaInfo", ".", "getInstance", "(", ")", ";", "List", "<", "String", ">", "list", "=", "info", ".", "currencies", "(", "Curren...
Returns the set of available currencies. The returned set of currencies contains all of the available currencies, including obsolete ones. The result set can be modified without affecting the available currencies in the runtime. @return The set of available currencies. The returned set could be empty if there is no cu...
[ "Returns", "the", "set", "of", "available", "currencies", ".", "The", "returned", "set", "of", "currencies", "contains", "all", "of", "the", "available", "currencies", "including", "obsolete", "ones", ".", "The", "result", "set", "can", "be", "modified", "with...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java#L212-L220
35,348
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java
Currency.getInstance
public static Currency getInstance(String theISOCode) { if (theISOCode == null) { throw new NullPointerException("The input currency code is null."); } if (!isAlpha3Code(theISOCode)) { throw new IllegalArgumentException( "The input currency code is not...
java
public static Currency getInstance(String theISOCode) { if (theISOCode == null) { throw new NullPointerException("The input currency code is null."); } if (!isAlpha3Code(theISOCode)) { throw new IllegalArgumentException( "The input currency code is not...
[ "public", "static", "Currency", "getInstance", "(", "String", "theISOCode", ")", "{", "if", "(", "theISOCode", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"The input currency code is null.\"", ")", ";", "}", "if", "(", "!", "isAlpha3Co...
Returns a currency object given an ISO 4217 3-letter code. @param theISOCode the iso code @return the currency for this iso code @throws NullPointerException if <code>theISOCode</code> is null. @throws IllegalArgumentException if <code>theISOCode</code> is not a 3-letter alpha code.
[ "Returns", "a", "currency", "object", "given", "an", "ISO", "4217", "3", "-", "letter", "code", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java#L282-L291
35,349
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java
Currency.registerInstance
public static Object registerInstance(Currency currency, ULocale locale) { return getShim().registerInstance(currency, locale); }
java
public static Object registerInstance(Currency currency, ULocale locale) { return getShim().registerInstance(currency, locale); }
[ "public", "static", "Object", "registerInstance", "(", "Currency", "currency", ",", "ULocale", "locale", ")", "{", "return", "getShim", "(", ")", ".", "registerInstance", "(", "currency", ",", "locale", ")", ";", "}" ]
Registers a new currency for the provided locale. The returned object is a key that can be used to unregister this currency object. <p>Because ICU may choose to cache Currency objects internally, this must be called at application startup, prior to any calls to Currency.getInstance to avoid undefined behavior. @para...
[ "Registers", "a", "new", "currency", "for", "the", "provided", "locale", ".", "The", "returned", "object", "is", "a", "key", "that", "can", "be", "used", "to", "unregister", "this", "currency", "object", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java#L322-L324
35,350
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java
Currency.parse
@Deprecated public static String parse(ULocale locale, String text, int type, ParsePosition pos) { List<TextTrieMap<CurrencyStringInfo>> currencyTrieVec = CURRENCY_NAME_CACHE.get(locale); if (currencyTrieVec == null) { TextTrieMap<CurrencyStringInfo> currencyNameTrie = ne...
java
@Deprecated public static String parse(ULocale locale, String text, int type, ParsePosition pos) { List<TextTrieMap<CurrencyStringInfo>> currencyTrieVec = CURRENCY_NAME_CACHE.get(locale); if (currencyTrieVec == null) { TextTrieMap<CurrencyStringInfo> currencyNameTrie = ne...
[ "@", "Deprecated", "public", "static", "String", "parse", "(", "ULocale", "locale", ",", "String", "text", ",", "int", "type", ",", "ParsePosition", "pos", ")", "{", "List", "<", "TextTrieMap", "<", "CurrencyStringInfo", ">>", "currencyTrieVec", "=", "CURRENCY...
Attempt to parse the given string as a currency, either as a display name in the given locale, or as a 3-letter ISO 4217 code. If multiple display names match, then the longest one is selected. If both a display name and a 3-letter ISO code match, then the display name is preferred, unless it's length is less than 3....
[ "Attempt", "to", "parse", "the", "given", "string", "as", "a", "currency", "either", "as", "a", "display", "name", "in", "the", "given", "locale", "or", "as", "a", "3", "-", "letter", "ISO", "4217", "code", ".", "If", "multiple", "display", "names", "m...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java#L649-L686
35,351
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java
Currency.getDefaultFractionDigits
public int getDefaultFractionDigits(CurrencyUsage Usage) { CurrencyMetaInfo info = CurrencyMetaInfo.getInstance(); CurrencyDigits digits = info.currencyDigits(subType, Usage); return digits.fractionDigits; }
java
public int getDefaultFractionDigits(CurrencyUsage Usage) { CurrencyMetaInfo info = CurrencyMetaInfo.getInstance(); CurrencyDigits digits = info.currencyDigits(subType, Usage); return digits.fractionDigits; }
[ "public", "int", "getDefaultFractionDigits", "(", "CurrencyUsage", "Usage", ")", "{", "CurrencyMetaInfo", "info", "=", "CurrencyMetaInfo", ".", "getInstance", "(", ")", ";", "CurrencyDigits", "digits", "=", "info", ".", "currencyDigits", "(", "subType", ",", "Usag...
Returns the number of the number of fraction digits that should be displayed for this currency with Usage. @param Usage the usage of currency(Standard or Cash) @return a non-negative number of fraction digits to be displayed
[ "Returns", "the", "number", "of", "the", "number", "of", "fraction", "digits", "that", "should", "be", "displayed", "for", "this", "currency", "with", "Usage", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java#L778-L782
35,352
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java
Currency.getRoundingIncrement
public double getRoundingIncrement(CurrencyUsage Usage) { CurrencyMetaInfo info = CurrencyMetaInfo.getInstance(); CurrencyDigits digits = info.currencyDigits(subType, Usage); int data1 = digits.roundingIncrement; // If there is no rounding return 0.0 to indicate no rounding. //...
java
public double getRoundingIncrement(CurrencyUsage Usage) { CurrencyMetaInfo info = CurrencyMetaInfo.getInstance(); CurrencyDigits digits = info.currencyDigits(subType, Usage); int data1 = digits.roundingIncrement; // If there is no rounding return 0.0 to indicate no rounding. //...
[ "public", "double", "getRoundingIncrement", "(", "CurrencyUsage", "Usage", ")", "{", "CurrencyMetaInfo", "info", "=", "CurrencyMetaInfo", ".", "getInstance", "(", ")", ";", "CurrencyDigits", "digits", "=", "info", ".", "currencyDigits", "(", "subType", ",", "Usage...
Returns the rounding increment for this currency, or 0.0 if no rounding is done by this currency with the Usage. @param Usage the usage of currency(Standard or Cash) @return the non-negative rounding increment, or 0.0 if none
[ "Returns", "the", "rounding", "increment", "for", "this", "currency", "or", "0", ".", "0", "if", "no", "rounding", "is", "done", "by", "this", "currency", "with", "the", "Usage", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java#L800-L822
35,353
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java
Currency.getTenderCurrencies
private static List<String> getTenderCurrencies(CurrencyFilter filter) { CurrencyMetaInfo info = CurrencyMetaInfo.getInstance(); return info.currencies(filter.withTender()); }
java
private static List<String> getTenderCurrencies(CurrencyFilter filter) { CurrencyMetaInfo info = CurrencyMetaInfo.getInstance(); return info.currencies(filter.withTender()); }
[ "private", "static", "List", "<", "String", ">", "getTenderCurrencies", "(", "CurrencyFilter", "filter", ")", "{", "CurrencyMetaInfo", "info", "=", "CurrencyMetaInfo", ".", "getInstance", "(", ")", ";", "return", "info", ".", "currencies", "(", "filter", ".", ...
Returns the list of remaining tender currencies after a filter is applied. @param filter the filter to apply to the tender currencies @return a list of tender currencies
[ "Returns", "the", "list", "of", "remaining", "tender", "currencies", "after", "a", "filter", "is", "applied", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Currency.java#L928-L931
35,354
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/extensions/ExpressionVisitor.java
ExpressionVisitor.visitFunction
public boolean visitFunction(ExpressionOwner owner, Function func) { if (func instanceof FuncExtFunction) { String namespace = ((FuncExtFunction)func).getNamespace(); m_sroot.getExtensionNamespacesManager().registerExtension(namespace); } else if (func instanceof FuncExtFunctionAvail...
java
public boolean visitFunction(ExpressionOwner owner, Function func) { if (func instanceof FuncExtFunction) { String namespace = ((FuncExtFunction)func).getNamespace(); m_sroot.getExtensionNamespacesManager().registerExtension(namespace); } else if (func instanceof FuncExtFunctionAvail...
[ "public", "boolean", "visitFunction", "(", "ExpressionOwner", "owner", ",", "Function", "func", ")", "{", "if", "(", "func", "instanceof", "FuncExtFunction", ")", "{", "String", "namespace", "=", "(", "(", "FuncExtFunction", ")", "func", ")", ".", "getNamespac...
If the function is an extension function, register the namespace. @param owner The current XPath object that owns the expression. @param func The function currently being visited. @return true to continue the visit in the subtree, if any.
[ "If", "the", "function", "is", "an", "extension", "function", "register", "the", "namespace", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/extensions/ExpressionVisitor.java#L62-L80
35,355
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/ManifestDigester.java
ManifestDigester.findSection
@SuppressWarnings("fallthrough") private boolean findSection(int offset, Position pos) { int i = offset, len = rawBytes.length; int last = offset; int next; boolean allBlank = true; pos.endOfFirstLine = -1; while (i < len) { byte b = rawBytes[i]; ...
java
@SuppressWarnings("fallthrough") private boolean findSection(int offset, Position pos) { int i = offset, len = rawBytes.length; int last = offset; int next; boolean allBlank = true; pos.endOfFirstLine = -1; while (i < len) { byte b = rawBytes[i]; ...
[ "@", "SuppressWarnings", "(", "\"fallthrough\"", ")", "private", "boolean", "findSection", "(", "int", "offset", ",", "Position", "pos", ")", "{", "int", "i", "=", "offset", ",", "len", "=", "rawBytes", ".", "length", ";", "int", "last", "=", "offset", "...
find a section in the manifest. @param offset should point to the starting offset with in the raw bytes of the next section. @pos set by @returns false if end of bytes has been reached, otherwise returns true
[ "find", "a", "section", "in", "the", "manifest", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/ManifestDigester.java#L65-L108
35,356
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalDataCache.java
CompactDecimalDataCache.get
DataBundle get(ULocale locale) { DataBundle result = cache.get(locale); if (result == null) { result = load(locale); cache.put(locale, result); } return result; }
java
DataBundle get(ULocale locale) { DataBundle result = cache.get(locale); if (result == null) { result = load(locale); cache.put(locale, result); } return result; }
[ "DataBundle", "get", "(", "ULocale", "locale", ")", "{", "DataBundle", "result", "=", "cache", ".", "get", "(", "locale", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "load", "(", "locale", ")", ";", "cache", ".", "put", "(...
Fetch data for a particular locale. Clients must not modify any part of the returned data. Portions of returned data may be shared so modifying it will have unpredictable results.
[ "Fetch", "data", "for", "a", "particular", "locale", ".", "Clients", "must", "not", "modify", "any", "part", "of", "the", "returned", "data", ".", "Portions", "of", "returned", "data", "may", "be", "shared", "so", "modifying", "it", "will", "have", "unpred...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalDataCache.java#L273-L280
35,357
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalDataCache.java
CompactDecimalDataCache.calculateDivisor
private static long calculateDivisor(long power10, int numZeros) { // We craft our divisor such that when we divide by it, we get a // number with the same number of digits as zeros found in the // plural variant templates. If our magnitude is 10000 and we have // two 0's in our plural v...
java
private static long calculateDivisor(long power10, int numZeros) { // We craft our divisor such that when we divide by it, we get a // number with the same number of digits as zeros found in the // plural variant templates. If our magnitude is 10000 and we have // two 0's in our plural v...
[ "private", "static", "long", "calculateDivisor", "(", "long", "power10", ",", "int", "numZeros", ")", "{", "// We craft our divisor such that when we divide by it, we get a", "// number with the same number of digits as zeros found in the", "// plural variant templates. If our magnitude ...
Calculate a divisor based on the magnitude and number of zeros in the template string. @param power10 @param numZeros @return
[ "Calculate", "a", "divisor", "based", "on", "the", "magnitude", "and", "number", "of", "zeros", "in", "the", "template", "string", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalDataCache.java#L381-L393
35,358
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalDataCache.java
CompactDecimalDataCache.checkForOtherVariants
private static void checkForOtherVariants(Data data, ULocale locale, String style) { DecimalFormat.Unit[] otherByBase = data.units.get(OTHER); if (otherByBase == null) { throw new IllegalArgumentException("No 'other' plural variants defined in " + localeAndStyle(locale, ...
java
private static void checkForOtherVariants(Data data, ULocale locale, String style) { DecimalFormat.Unit[] otherByBase = data.units.get(OTHER); if (otherByBase == null) { throw new IllegalArgumentException("No 'other' plural variants defined in " + localeAndStyle(locale, ...
[ "private", "static", "void", "checkForOtherVariants", "(", "Data", "data", ",", "ULocale", "locale", ",", "String", "style", ")", "{", "DecimalFormat", ".", "Unit", "[", "]", "otherByBase", "=", "data", ".", "units", ".", "get", "(", "OTHER", ")", ";", "...
Checks to make sure that an "other" variant is present in all powers of 10. @param data
[ "Checks", "to", "make", "sure", "that", "an", "other", "variant", "is", "present", "in", "all", "powers", "of", "10", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalDataCache.java#L413-L435
35,359
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalDataCache.java
CompactDecimalDataCache.fillInMissing
private static void fillInMissing(Data result) { // Initially we assume that previous divisor is 1 with no prefix or suffix. long lastDivisor = 1L; for (int i = 0; i < result.divisors.length; i++) { if (result.units.get(OTHER)[i] == null) { result.divisors[i] = lastDi...
java
private static void fillInMissing(Data result) { // Initially we assume that previous divisor is 1 with no prefix or suffix. long lastDivisor = 1L; for (int i = 0; i < result.divisors.length; i++) { if (result.units.get(OTHER)[i] == null) { result.divisors[i] = lastDi...
[ "private", "static", "void", "fillInMissing", "(", "Data", "result", ")", "{", "// Initially we assume that previous divisor is 1 with no prefix or suffix.", "long", "lastDivisor", "=", "1L", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "result", ".", "di...
After reading information from resource bundle into a Data object, there is guarantee that it is complete. This method fixes any incomplete data it finds within <code>result</code>. It looks at each log10 value applying the two rules. <p> If no prefix is defined for the "other" variant, use the divisor, prefixes and s...
[ "After", "reading", "information", "from", "resource", "bundle", "into", "a", "Data", "object", "there", "is", "guarantee", "that", "it", "is", "complete", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalDataCache.java#L455-L467
35,360
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalDataCache.java
CompactDecimalDataCache.getUnit
static DecimalFormat.Unit getUnit( Map<String, DecimalFormat.Unit[]> units, String variant, int base) { DecimalFormat.Unit[] byBase = units.get(variant); if (byBase == null) { byBase = units.get(CompactDecimalDataCache.OTHER); } return byBase[base]; }
java
static DecimalFormat.Unit getUnit( Map<String, DecimalFormat.Unit[]> units, String variant, int base) { DecimalFormat.Unit[] byBase = units.get(variant); if (byBase == null) { byBase = units.get(CompactDecimalDataCache.OTHER); } return byBase[base]; }
[ "static", "DecimalFormat", ".", "Unit", "getUnit", "(", "Map", "<", "String", ",", "DecimalFormat", ".", "Unit", "[", "]", ">", "units", ",", "String", "variant", ",", "int", "base", ")", "{", "DecimalFormat", ".", "Unit", "[", "]", "byBase", "=", "uni...
Fetches a prefix or suffix given a plural variant and log10 value. If it can't find the given variant, it falls back to "other". @param prefixOrSuffix the prefix or suffix map @param variant the plural variant @param base log10 value. 0 <= base < MAX_DIGITS. @return the prefix or suffix.
[ "Fetches", "a", "prefix", "or", "suffix", "given", "a", "plural", "variant", "and", "log10", "value", ".", "If", "it", "can", "t", "find", "the", "given", "variant", "it", "falls", "back", "to", "other", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalDataCache.java#L517-L524
35,361
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java
NamespaceMappings.lookupNamespace
public String lookupNamespace(String prefix) { String uri = null; final Stack stack = getPrefixStack(prefix); if (stack != null && !stack.isEmpty()) { uri = ((MappingRecord) stack.peek()).m_uri; } if (uri == null) uri = EMPTYSTRING; return uri;...
java
public String lookupNamespace(String prefix) { String uri = null; final Stack stack = getPrefixStack(prefix); if (stack != null && !stack.isEmpty()) { uri = ((MappingRecord) stack.peek()).m_uri; } if (uri == null) uri = EMPTYSTRING; return uri;...
[ "public", "String", "lookupNamespace", "(", "String", "prefix", ")", "{", "String", "uri", "=", "null", ";", "final", "Stack", "stack", "=", "getPrefixStack", "(", "prefix", ")", ";", "if", "(", "stack", "!=", "null", "&&", "!", "stack", ".", "isEmpty", ...
Use a namespace prefix to lookup a namespace URI. @param prefix String the prefix of the namespace @return the URI corresponding to the prefix, returns "" if there is no visible mapping.
[ "Use", "a", "namespace", "prefix", "to", "lookup", "a", "namespace", "URI", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java#L138-L148
35,362
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java
NamespaceMappings.lookupPrefix
public String lookupPrefix(String uri) { String foundPrefix = null; Enumeration prefixes = m_namespaces.keys(); while (prefixes.hasMoreElements()) { String prefix = (String) prefixes.nextElement(); String uri2 = lookupNamespace(prefix); if (uri2 !=...
java
public String lookupPrefix(String uri) { String foundPrefix = null; Enumeration prefixes = m_namespaces.keys(); while (prefixes.hasMoreElements()) { String prefix = (String) prefixes.nextElement(); String uri2 = lookupNamespace(prefix); if (uri2 !=...
[ "public", "String", "lookupPrefix", "(", "String", "uri", ")", "{", "String", "foundPrefix", "=", "null", ";", "Enumeration", "prefixes", "=", "m_namespaces", ".", "keys", "(", ")", ";", "while", "(", "prefixes", ".", "hasMoreElements", "(", ")", ")", "{",...
Given a namespace uri, and the namespaces mappings for the current element, return the current prefix for that uri. @param uri the namespace URI to be search for @return an existing prefix that maps to the given URI, null if no prefix maps to the given namespace URI.
[ "Given", "a", "namespace", "uri", "and", "the", "namespaces", "mappings", "for", "the", "current", "element", "return", "the", "current", "prefix", "for", "that", "uri", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java#L165-L180
35,363
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java
NamespaceMappings.popNamespace
boolean popNamespace(String prefix) { // Prefixes "xml" and "xmlns" cannot be redefined if (prefix.startsWith(XML_PREFIX)) { return false; } Stack stack; if ((stack = getPrefixStack(prefix)) != null) { stack.pop(); return t...
java
boolean popNamespace(String prefix) { // Prefixes "xml" and "xmlns" cannot be redefined if (prefix.startsWith(XML_PREFIX)) { return false; } Stack stack; if ((stack = getPrefixStack(prefix)) != null) { stack.pop(); return t...
[ "boolean", "popNamespace", "(", "String", "prefix", ")", "{", "// Prefixes \"xml\" and \"xmlns\" cannot be redefined", "if", "(", "prefix", ".", "startsWith", "(", "XML_PREFIX", ")", ")", "{", "return", "false", ";", "}", "Stack", "stack", ";", "if", "(", "(", ...
Undeclare the namespace that is currently pointed to by a given prefix
[ "Undeclare", "the", "namespace", "that", "is", "currently", "pointed", "to", "by", "a", "given", "prefix" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java#L202-L217
35,364
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java
NamespaceMappings.pushNamespace
public boolean pushNamespace(String prefix, String uri, int elemDepth) { // Prefixes "xml" and "xmlns" cannot be redefined if (prefix.startsWith(XML_PREFIX)) { return false; } Stack stack; // Get the stack that contains URIs for the specified prefix ...
java
public boolean pushNamespace(String prefix, String uri, int elemDepth) { // Prefixes "xml" and "xmlns" cannot be redefined if (prefix.startsWith(XML_PREFIX)) { return false; } Stack stack; // Get the stack that contains URIs for the specified prefix ...
[ "public", "boolean", "pushNamespace", "(", "String", "prefix", ",", "String", "uri", ",", "int", "elemDepth", ")", "{", "// Prefixes \"xml\" and \"xmlns\" cannot be redefined", "if", "(", "prefix", ".", "startsWith", "(", "XML_PREFIX", ")", ")", "{", "return", "fa...
Declare a mapping of a prefix to namespace URI at the given element depth. @param prefix a String with the prefix for a qualified name @param uri a String with the uri to which the prefix is to map @param elemDepth the depth of current declaration
[ "Declare", "a", "mapping", "of", "a", "prefix", "to", "namespace", "URI", "at", "the", "given", "element", "depth", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java#L225-L255
35,365
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java
NamespaceMappings.popNamespaces
void popNamespaces(int elemDepth, ContentHandler saxHandler) { while (true) { if (m_nodeStack.isEmpty()) return; MappingRecord map = (MappingRecord) (m_nodeStack.peek()); int depth = map.m_declarationDepth; if (elemDepth < 1 || map.m_de...
java
void popNamespaces(int elemDepth, ContentHandler saxHandler) { while (true) { if (m_nodeStack.isEmpty()) return; MappingRecord map = (MappingRecord) (m_nodeStack.peek()); int depth = map.m_declarationDepth; if (elemDepth < 1 || map.m_de...
[ "void", "popNamespaces", "(", "int", "elemDepth", ",", "ContentHandler", "saxHandler", ")", "{", "while", "(", "true", ")", "{", "if", "(", "m_nodeStack", ".", "isEmpty", "(", ")", ")", "return", ";", "MappingRecord", "map", "=", "(", "MappingRecord", ")",...
Pop, or undeclare all namespace definitions that are currently declared at the given element depth, or deepter. @param elemDepth the element depth for which mappings declared at this depth or deeper will no longer be valid @param saxHandler The ContentHandler to notify of any endPrefixMapping() calls. This parameter c...
[ "Pop", "or", "undeclare", "all", "namespace", "definitions", "that", "are", "currently", "declared", "at", "the", "given", "element", "depth", "or", "deepter", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java#L265-L315
35,366
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java
NamespaceMappings.createPrefixStack
private Stack createPrefixStack(String prefix) { Stack fs = new Stack(); m_namespaces.put(prefix, fs); return fs; }
java
private Stack createPrefixStack(String prefix) { Stack fs = new Stack(); m_namespaces.put(prefix, fs); return fs; }
[ "private", "Stack", "createPrefixStack", "(", "String", "prefix", ")", "{", "Stack", "fs", "=", "new", "Stack", "(", ")", ";", "m_namespaces", ".", "put", "(", "prefix", ",", "fs", ")", ";", "return", "fs", ";", "}" ]
A more type-safe way of saving stacks under the m_namespaces Hashtable.
[ "A", "more", "type", "-", "safe", "way", "of", "saving", "stacks", "under", "the", "m_namespaces", "Hashtable", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java#L467-L472
35,367
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java
NamespaceMappings.lookupAllPrefixes
public String[] lookupAllPrefixes(String uri) { java.util.ArrayList foundPrefixes = new java.util.ArrayList(); Enumeration prefixes = m_namespaces.keys(); while (prefixes.hasMoreElements()) { String prefix = (String) prefixes.nextElement(); String uri2 = looku...
java
public String[] lookupAllPrefixes(String uri) { java.util.ArrayList foundPrefixes = new java.util.ArrayList(); Enumeration prefixes = m_namespaces.keys(); while (prefixes.hasMoreElements()) { String prefix = (String) prefixes.nextElement(); String uri2 = looku...
[ "public", "String", "[", "]", "lookupAllPrefixes", "(", "String", "uri", ")", "{", "java", ".", "util", ".", "ArrayList", "foundPrefixes", "=", "new", "java", ".", "util", ".", "ArrayList", "(", ")", ";", "Enumeration", "prefixes", "=", "m_namespaces", "."...
Given a namespace uri, get all prefixes bound to the Namespace URI in the current scope. @param uri the namespace URI to be search for @return An array of Strings which are all prefixes bound to the namespace URI in the current scope. An array of zero elements is returned if no prefixes map to the given namespace URI.
[ "Given", "a", "namespace", "uri", "get", "all", "prefixes", "bound", "to", "the", "Namespace", "URI", "in", "the", "current", "scope", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/NamespaceMappings.java#L483-L499
35,368
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetDetector.java
CharsetDetector.detect
public CharsetMatch detect() { // TODO: A better implementation would be to copy the detect loop from // detectAll(), and cut it short as soon as a match with a high confidence // is found. This is something to be done later, after things are otherwise // working. CharsetMatch mat...
java
public CharsetMatch detect() { // TODO: A better implementation would be to copy the detect loop from // detectAll(), and cut it short as soon as a match with a high confidence // is found. This is something to be done later, after things are otherwise // working. CharsetMatch mat...
[ "public", "CharsetMatch", "detect", "(", ")", "{", "// TODO: A better implementation would be to copy the detect loop from", "// detectAll(), and cut it short as soon as a match with a high confidence", "// is found. This is something to be done later, after things are otherwis...
Return the charset that best matches the supplied input data. Note though, that because the detection only looks at the start of the input data, there is a possibility that the returned charset will fail to handle the full set of input data. <p> Raise an exception if <ul> <li>no charset appears to match the data.</li>...
[ "Return", "the", "charset", "that", "best", "matches", "the", "supplied", "input", "data", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetDetector.java#L148-L160
35,369
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetDetector.java
CharsetDetector.getDetectableCharsets
@Deprecated public String[] getDetectableCharsets() { List<String> csnames = new ArrayList<String>(ALL_CS_RECOGNIZERS.size()); for (int i = 0; i < ALL_CS_RECOGNIZERS.size(); i++) { CSRecognizerInfo rcinfo = ALL_CS_RECOGNIZERS.get(i); boolean active = (fEnabledRecognizers == n...
java
@Deprecated public String[] getDetectableCharsets() { List<String> csnames = new ArrayList<String>(ALL_CS_RECOGNIZERS.size()); for (int i = 0; i < ALL_CS_RECOGNIZERS.size(); i++) { CSRecognizerInfo rcinfo = ALL_CS_RECOGNIZERS.get(i); boolean active = (fEnabledRecognizers == n...
[ "@", "Deprecated", "public", "String", "[", "]", "getDetectableCharsets", "(", ")", "{", "List", "<", "String", ">", "csnames", "=", "new", "ArrayList", "<", "String", ">", "(", "ALL_CS_RECOGNIZERS", ".", "size", "(", ")", ")", ";", "for", "(", "int", ...
Get the names of charsets that can be recognized by this CharsetDetector instance. @return an array of the names of charsets that can be recognized by this CharsetDetector instance. @deprecated This API is ICU internal only. @hide draft / provisional / internal are hidden on Android
[ "Get", "the", "names", "of", "charsets", "that", "can", "be", "recognized", "by", "this", "CharsetDetector", "instance", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetDetector.java#L504-L515
35,370
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java
TransformerIdentityImpl.reset
public void reset() { m_flushedStartDoc = false; m_foundFirstElement = false; m_outputStream = null; clearParameters(); m_result = null; m_resultContentHandler = null; m_resultDeclHandler = null; m_resultDTDHandler = null; m_resultLexicalHandler = null; m_serializer = null; ...
java
public void reset() { m_flushedStartDoc = false; m_foundFirstElement = false; m_outputStream = null; clearParameters(); m_result = null; m_resultContentHandler = null; m_resultDeclHandler = null; m_resultDTDHandler = null; m_resultLexicalHandler = null; m_serializer = null; ...
[ "public", "void", "reset", "(", ")", "{", "m_flushedStartDoc", "=", "false", ";", "m_foundFirstElement", "=", "false", ";", "m_outputStream", "=", "null", ";", "clearParameters", "(", ")", ";", "m_result", "=", "null", ";", "m_resultContentHandler", "=", "null...
Reset the status of the transformer.
[ "Reset", "the", "status", "of", "the", "transformer", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java#L150-L165
35,371
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java
TransformerIdentityImpl.setParameter
public void setParameter(String name, Object value) { if (value == null) { throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_INVALID_SET_PARAM_VALUE, new Object[]{name})); } if (null == m_params) { m_params = new Hashtable(); } m_params.put(na...
java
public void setParameter(String name, Object value) { if (value == null) { throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_INVALID_SET_PARAM_VALUE, new Object[]{name})); } if (null == m_params) { m_params = new Hashtable(); } m_params.put(na...
[ "public", "void", "setParameter", "(", "String", "name", ",", "Object", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "XSLMessages", ".", "createMessage", "(", "XSLTErrorResources", ".", "ER_INV...
Add a parameter for the transformation. <p>Pass a qualified name as a two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the name has a null URL, the String only contain the local name. An application can safely check for a non-null URI by testing to see if the first chara...
[ "Add", "a", "parameter", "for", "the", "transformation", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java#L546-L558
35,372
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java
TransformerIdentityImpl.setOutputProperty
public void setOutputProperty(String name, String value) throws IllegalArgumentException { if (!OutputProperties.isLegalPropertyKey(name)) throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, new Object[]{name})); //"output property no...
java
public void setOutputProperty(String name, String value) throws IllegalArgumentException { if (!OutputProperties.isLegalPropertyKey(name)) throw new IllegalArgumentException(XSLMessages.createMessage(XSLTErrorResources.ER_OUTPUT_PROPERTY_NOT_RECOGNIZED, new Object[]{name})); //"output property no...
[ "public", "void", "setOutputProperty", "(", "String", "name", ",", "String", "value", ")", "throws", "IllegalArgumentException", "{", "if", "(", "!", "OutputProperties", ".", "isLegalPropertyKey", "(", "name", ")", ")", "throw", "new", "IllegalArgumentException", ...
Set an output property that will be in effect for the transformation. <p>Pass a qualified property name as a two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the name has a null URL, the String only contain the local name. An application can safely check for a non-null U...
[ "Set", "an", "output", "property", "that", "will", "be", "in", "effect", "for", "the", "transformation", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java#L735-L744
35,373
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java
TransformerIdentityImpl.setDocumentLocator
public void setDocumentLocator(Locator locator) { try { if (null == m_resultContentHandler) createResultContentHandler(m_result); } catch (TransformerException te) { throw new org.apache.xml.utils.WrappedRuntimeException(te); } m_resultContentHandler.setDocumentLocator...
java
public void setDocumentLocator(Locator locator) { try { if (null == m_resultContentHandler) createResultContentHandler(m_result); } catch (TransformerException te) { throw new org.apache.xml.utils.WrappedRuntimeException(te); } m_resultContentHandler.setDocumentLocator...
[ "public", "void", "setDocumentLocator", "(", "Locator", "locator", ")", "{", "try", "{", "if", "(", "null", "==", "m_resultContentHandler", ")", "createResultContentHandler", "(", "m_result", ")", ";", "}", "catch", "(", "TransformerException", "te", ")", "{", ...
Receive a Locator object for document events. <p>By default, do nothing. Application writers may override this method in a subclass if they wish to store the locator for use with other document events.</p> @param locator A locator for all SAX document events. @see org.xml.sax.ContentHandler#setDocumentLocator @see o...
[ "Receive", "a", "Locator", "object", "for", "document", "events", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java#L876-L889
35,374
google/j2objc
jre_emul/android/platform/external/okhttp/okio/okio/src/main/java/okio/Segment.java
Segment.pop
public Segment pop() { Segment result = next != this ? next : null; prev.next = next; next.prev = prev; next = null; prev = null; return result; }
java
public Segment pop() { Segment result = next != this ? next : null; prev.next = next; next.prev = prev; next = null; prev = null; return result; }
[ "public", "Segment", "pop", "(", ")", "{", "Segment", "result", "=", "next", "!=", "this", "?", "next", ":", "null", ";", "prev", ".", "next", "=", "next", ";", "next", ".", "prev", "=", "prev", ";", "next", "=", "null", ";", "prev", "=", "null",...
Removes this segment of a circularly-linked list and returns its successor. Returns null if the list is now empty.
[ "Removes", "this", "segment", "of", "a", "circularly", "-", "linked", "list", "and", "returns", "its", "successor", ".", "Returns", "null", "if", "the", "list", "is", "now", "empty", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/okhttp/okio/okio/src/main/java/okio/Segment.java#L80-L87
35,375
google/j2objc
jre_emul/android/platform/external/okhttp/okio/okio/src/main/java/okio/Segment.java
Segment.compact
public void compact() { if (prev == this) throw new IllegalStateException(); if (!prev.owner) return; // Cannot compact: prev isn't writable. int byteCount = limit - pos; int availableByteCount = SIZE - prev.limit + (prev.shared ? 0 : prev.pos); if (byteCount > availableByteCount) return; // Cannot ...
java
public void compact() { if (prev == this) throw new IllegalStateException(); if (!prev.owner) return; // Cannot compact: prev isn't writable. int byteCount = limit - pos; int availableByteCount = SIZE - prev.limit + (prev.shared ? 0 : prev.pos); if (byteCount > availableByteCount) return; // Cannot ...
[ "public", "void", "compact", "(", ")", "{", "if", "(", "prev", "==", "this", ")", "throw", "new", "IllegalStateException", "(", ")", ";", "if", "(", "!", "prev", ".", "owner", ")", "return", ";", "// Cannot compact: prev isn't writable.", "int", "byteCount",...
Call this when the tail and its predecessor may both be less than half full. This will copy data so that segments can be recycled.
[ "Call", "this", "when", "the", "tail", "and", "its", "predecessor", "may", "both", "be", "less", "than", "half", "full", ".", "This", "will", "copy", "data", "so", "that", "segments", "can", "be", "recycled", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/okhttp/okio/okio/src/main/java/okio/Segment.java#L122-L131
35,376
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.getInstance
@Deprecated public static SimpleDateFormat getInstance(Calendar.FormatConfiguration formatConfig) { String ostr = formatConfig.getOverrideString(); boolean useFast = ( ostr != null && ostr.length() > 0 ); return new SimpleDateFormat(formatConfig.getPatternString(), form...
java
@Deprecated public static SimpleDateFormat getInstance(Calendar.FormatConfiguration formatConfig) { String ostr = formatConfig.getOverrideString(); boolean useFast = ( ostr != null && ostr.length() > 0 ); return new SimpleDateFormat(formatConfig.getPatternString(), form...
[ "@", "Deprecated", "public", "static", "SimpleDateFormat", "getInstance", "(", "Calendar", ".", "FormatConfiguration", "formatConfig", ")", "{", "String", "ostr", "=", "formatConfig", ".", "getOverrideString", "(", ")", ";", "boolean", "useFast", "=", "(", "ostr",...
Creates an instance of SimpleDateFormat for the given format configuration @param formatConfig the format configuration @return A SimpleDateFormat instance @deprecated This API is ICU internal only. @hide original deprecated declaration @hide draft / provisional / internal are hidden on Android
[ "Creates", "an", "instance", "of", "SimpleDateFormat", "for", "the", "given", "format", "configuration" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L1083-L1096
35,377
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.initializeTimeZoneFormat
private synchronized void initializeTimeZoneFormat(boolean bForceUpdate) { if (bForceUpdate || tzFormat == null) { tzFormat = TimeZoneFormat.getInstance(locale); String digits = null; if (numberFormat instanceof DecimalFormat) { DecimalFormatSymbols decsym = ...
java
private synchronized void initializeTimeZoneFormat(boolean bForceUpdate) { if (bForceUpdate || tzFormat == null) { tzFormat = TimeZoneFormat.getInstance(locale); String digits = null; if (numberFormat instanceof DecimalFormat) { DecimalFormatSymbols decsym = ...
[ "private", "synchronized", "void", "initializeTimeZoneFormat", "(", "boolean", "bForceUpdate", ")", "{", "if", "(", "bForceUpdate", "||", "tzFormat", "==", "null", ")", "{", "tzFormat", "=", "TimeZoneFormat", ".", "getInstance", "(", "locale", ")", ";", "String"...
Private method lazily instantiate the TimeZoneFormat field @param bForceUpdate when true, check if tzFormat is synchronized with the current numberFormat and update its digits if necessary. When false, this check is skipped.
[ "Private", "method", "lazily", "instantiate", "the", "TimeZoneFormat", "field" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L1142-L1163
35,378
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.setContext
@Override public void setContext(DisplayContext context) { super.setContext(context); if (capitalizationBrkIter == null && (context==DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE || context==DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU || context==DisplayCo...
java
@Override public void setContext(DisplayContext context) { super.setContext(context); if (capitalizationBrkIter == null && (context==DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE || context==DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU || context==DisplayCo...
[ "@", "Override", "public", "void", "setContext", "(", "DisplayContext", "context", ")", "{", "super", ".", "setContext", "(", "context", ")", ";", "if", "(", "capitalizationBrkIter", "==", "null", "&&", "(", "context", "==", "DisplayContext", ".", "CAPITALIZAT...
Here we override the DateFormat implementation in order to lazily initialize relevant items
[ "Here", "we", "override", "the", "DateFormat", "implementation", "in", "order", "to", "lazily", "initialize", "relevant", "items" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L1290-L1298
35,379
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.format
private StringBuffer format(Calendar cal, DisplayContext capitalizationContext, StringBuffer toAppendTo, FieldPosition pos, List<FieldPosition> attributes) { // Initialize pos.setBeginIndex(0); pos.setEndIndex(0); // Careful: For best performance, minimize the number of call...
java
private StringBuffer format(Calendar cal, DisplayContext capitalizationContext, StringBuffer toAppendTo, FieldPosition pos, List<FieldPosition> attributes) { // Initialize pos.setBeginIndex(0); pos.setEndIndex(0); // Careful: For best performance, minimize the number of call...
[ "private", "StringBuffer", "format", "(", "Calendar", "cal", ",", "DisplayContext", "capitalizationContext", ",", "StringBuffer", "toAppendTo", ",", "FieldPosition", "pos", ",", "List", "<", "FieldPosition", ">", "attributes", ")", "{", "// Initialize", "pos", ".", ...
then attribute information will be recorded.
[ "then", "attribute", "information", "will", "be", "recorded", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L1335-L1379
35,380
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.patternCharToDateFormatField
protected DateFormat.Field patternCharToDateFormatField(char ch) { int patternCharIndex = getIndexFromChar(ch); if (patternCharIndex != -1) { return PATTERN_INDEX_TO_DATE_FORMAT_ATTRIBUTE[patternCharIndex]; } return null; }
java
protected DateFormat.Field patternCharToDateFormatField(char ch) { int patternCharIndex = getIndexFromChar(ch); if (patternCharIndex != -1) { return PATTERN_INDEX_TO_DATE_FORMAT_ATTRIBUTE[patternCharIndex]; } return null; }
[ "protected", "DateFormat", ".", "Field", "patternCharToDateFormatField", "(", "char", "ch", ")", "{", "int", "patternCharIndex", "=", "getIndexFromChar", "(", "ch", ")", ";", "if", "(", "patternCharIndex", "!=", "-", "1", ")", "{", "return", "PATTERN_INDEX_TO_DA...
Returns a DateFormat.Field constant associated with the specified format pattern character. @param ch The pattern character @return DateFormat.Field associated with the pattern character
[ "Returns", "a", "DateFormat", ".", "Field", "constant", "associated", "with", "the", "specified", "format", "pattern", "character", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L1482-L1488
35,381
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.subFormat
protected String subFormat(char ch, int count, int beginOffset, FieldPosition pos, DateFormatSymbols fmtData, Calendar cal) throws IllegalArgumentException { // Note: formatData is ignored return subFormat(ch, count, beginOffset, ...
java
protected String subFormat(char ch, int count, int beginOffset, FieldPosition pos, DateFormatSymbols fmtData, Calendar cal) throws IllegalArgumentException { // Note: formatData is ignored return subFormat(ch, count, beginOffset, ...
[ "protected", "String", "subFormat", "(", "char", "ch", ",", "int", "count", ",", "int", "beginOffset", ",", "FieldPosition", "pos", ",", "DateFormatSymbols", "fmtData", ",", "Calendar", "cal", ")", "throws", "IllegalArgumentException", "{", "// Note: formatData is i...
Formats a single field, given its pattern character. Subclasses may override this method in order to modify or add formatting capabilities. @param ch the pattern character @param count the number of times ch is repeated in the pattern @param beginOffset the offset of the output string at the start of this field; used ...
[ "Formats", "a", "single", "field", "given", "its", "pattern", "character", ".", "Subclasses", "may", "override", "this", "method", "in", "order", "to", "modify", "or", "add", "formatting", "capabilities", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L1501-L1508
35,382
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.zeroPaddingNumber
@Deprecated protected void zeroPaddingNumber(NumberFormat nf,StringBuffer buf, int value, int minDigits, int maxDigits) { // Note: Indian calendar uses negative value for a calendar // field. fastZeroPaddingNumber cannot handle negative numbers. // BTW, i...
java
@Deprecated protected void zeroPaddingNumber(NumberFormat nf,StringBuffer buf, int value, int minDigits, int maxDigits) { // Note: Indian calendar uses negative value for a calendar // field. fastZeroPaddingNumber cannot handle negative numbers. // BTW, i...
[ "@", "Deprecated", "protected", "void", "zeroPaddingNumber", "(", "NumberFormat", "nf", ",", "StringBuffer", "buf", ",", "int", "value", ",", "int", "minDigits", ",", "int", "maxDigits", ")", "{", "// Note: Indian calendar uses negative value for a calendar", "// field....
Internal high-speed method. Reuses a StringBuffer for results instead of creating a String on the heap for each call. @deprecated This API is ICU internal only. @hide original deprecated declaration @hide draft / provisional / internal are hidden on Android
[ "Internal", "high", "-", "speed", "method", ".", "Reuses", "a", "StringBuffer", "for", "results", "instead", "of", "creating", "a", "String", "on", "the", "heap", "for", "each", "call", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L2187-L2200
35,383
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.isNumeric
private static final boolean isNumeric(char formatChar, int count) { return NUMERIC_FORMAT_CHARS.indexOf(formatChar) >= 0 || (count <= 2 && NUMERIC_FORMAT_CHARS2.indexOf(formatChar) >= 0); }
java
private static final boolean isNumeric(char formatChar, int count) { return NUMERIC_FORMAT_CHARS.indexOf(formatChar) >= 0 || (count <= 2 && NUMERIC_FORMAT_CHARS2.indexOf(formatChar) >= 0); }
[ "private", "static", "final", "boolean", "isNumeric", "(", "char", "formatChar", ",", "int", "count", ")", "{", "return", "NUMERIC_FORMAT_CHARS", ".", "indexOf", "(", "formatChar", ")", ">=", "0", "||", "(", "count", "<=", "2", "&&", "NUMERIC_FORMAT_CHARS2", ...
Return true if the given format character, occuring count times, represents a numeric field.
[ "Return", "true", "if", "the", "given", "format", "character", "occuring", "count", "times", "represents", "a", "numeric", "field", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L2309-L2312
35,384
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.matchDayPeriodString
private int matchDayPeriodString(String text, int start, String[] data, int dataLength, Output<DayPeriodRules.DayPeriod> dayPeriod) { int bestMatchLength = 0, bestMatch = -1; int matchLength = 0; for (int i = 0; i < dataLength; ++i) { // Only try matching if the strin...
java
private int matchDayPeriodString(String text, int start, String[] data, int dataLength, Output<DayPeriodRules.DayPeriod> dayPeriod) { int bestMatchLength = 0, bestMatch = -1; int matchLength = 0; for (int i = 0; i < dataLength; ++i) { // Only try matching if the strin...
[ "private", "int", "matchDayPeriodString", "(", "String", "text", ",", "int", "start", ",", "String", "[", "]", "data", ",", "int", "dataLength", ",", "Output", "<", "DayPeriodRules", ".", "DayPeriod", ">", "dayPeriod", ")", "{", "int", "bestMatchLength", "="...
Similar to matchQuarterString but customized for day periods.
[ "Similar", "to", "matchQuarterString", "but", "customized", "for", "day", "periods", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L2994-L3017
35,385
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.allowNumericFallback
private boolean allowNumericFallback(int patternCharIndex) { if (patternCharIndex == 26 /*'L' STAND_ALONE_MONTH*/ || patternCharIndex == 19 /*'e' DOW_LOCAL*/ || patternCharIndex == 25 /*'c' STAND_ALONE_DAY_OF_WEEK*/ || patternCharIndex == 30 /*'U' YEAR_NAME_FIELD*/ || ...
java
private boolean allowNumericFallback(int patternCharIndex) { if (patternCharIndex == 26 /*'L' STAND_ALONE_MONTH*/ || patternCharIndex == 19 /*'e' DOW_LOCAL*/ || patternCharIndex == 25 /*'c' STAND_ALONE_DAY_OF_WEEK*/ || patternCharIndex == 30 /*'U' YEAR_NAME_FIELD*/ || ...
[ "private", "boolean", "allowNumericFallback", "(", "int", "patternCharIndex", ")", "{", "if", "(", "patternCharIndex", "==", "26", "/*'L' STAND_ALONE_MONTH*/", "||", "patternCharIndex", "==", "19", "/*'e' DOW_LOCAL*/", "||", "patternCharIndex", "==", "25", "/*'c' STAND_...
return true if the pattern specified by patternCharIndex is one that allows numeric fallback regardless of actual pattern size.
[ "return", "true", "if", "the", "pattern", "specified", "by", "patternCharIndex", "is", "one", "that", "allows", "numeric", "fallback", "regardless", "of", "actual", "pattern", "size", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L3704-L3714
35,386
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.parseInt
private Number parseInt(String text, ParsePosition pos, boolean allowNegative, NumberFormat fmt) { return parseInt(text, -1, pos, allowNegative, fmt); }
java
private Number parseInt(String text, ParsePosition pos, boolean allowNegative, NumberFormat fmt) { return parseInt(text, -1, pos, allowNegative, fmt); }
[ "private", "Number", "parseInt", "(", "String", "text", ",", "ParsePosition", "pos", ",", "boolean", "allowNegative", ",", "NumberFormat", "fmt", ")", "{", "return", "parseInt", "(", "text", ",", "-", "1", ",", "pos", ",", "allowNegative", ",", "fmt", ")",...
Parse an integer using numberFormat. This method is semantically const, but actually may modify fNumberFormat.
[ "Parse", "an", "integer", "using", "numberFormat", ".", "This", "method", "is", "semantically", "const", "but", "actually", "may", "modify", "fNumberFormat", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L3720-L3725
35,387
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.parseInt
private Number parseInt(String text, int maxDigits, ParsePosition pos, boolean allowNegative, NumberFormat fmt) { Number number; int oldPos = pos.getIndex(); if (allowNegative) { ...
java
private Number parseInt(String text, int maxDigits, ParsePosition pos, boolean allowNegative, NumberFormat fmt) { Number number; int oldPos = pos.getIndex(); if (allowNegative) { ...
[ "private", "Number", "parseInt", "(", "String", "text", ",", "int", "maxDigits", ",", "ParsePosition", "pos", ",", "boolean", "allowNegative", ",", "NumberFormat", "fmt", ")", "{", "Number", "number", ";", "int", "oldPos", "=", "pos", ".", "getIndex", "(", ...
Parse an integer using numberFormat up to maxDigits.
[ "Parse", "an", "integer", "using", "numberFormat", "up", "to", "maxDigits", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L3730-L3773
35,388
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.translatePattern
private String translatePattern(String pat, String from, String to) { StringBuilder result = new StringBuilder(); boolean inQuote = false; for (int i = 0; i < pat.length(); ++i) { char c = pat.charAt(i); if (inQuote) { if (c == '\'') in...
java
private String translatePattern(String pat, String from, String to) { StringBuilder result = new StringBuilder(); boolean inQuote = false; for (int i = 0; i < pat.length(); ++i) { char c = pat.charAt(i); if (inQuote) { if (c == '\'') in...
[ "private", "String", "translatePattern", "(", "String", "pat", ",", "String", "from", ",", "String", "to", ")", "{", "StringBuilder", "result", "=", "new", "StringBuilder", "(", ")", ";", "boolean", "inQuote", "=", "false", ";", "for", "(", "int", "i", "...
Translate a pattern, mapping each character in the from string to the corresponding character in the to string.
[ "Translate", "a", "pattern", "mapping", "each", "character", "in", "the", "from", "string", "to", "the", "corresponding", "character", "in", "the", "to", "string", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L3780-L3806
35,389
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.applyPattern
public void applyPattern(String pat) { this.pattern = pat; parsePattern(); setLocale(null, null); // reset parsed pattern items patternItems = null; }
java
public void applyPattern(String pat) { this.pattern = pat; parsePattern(); setLocale(null, null); // reset parsed pattern items patternItems = null; }
[ "public", "void", "applyPattern", "(", "String", "pat", ")", "{", "this", ".", "pattern", "=", "pat", ";", "parsePattern", "(", ")", ";", "setLocale", "(", "null", ",", "null", ")", ";", "// reset parsed pattern items", "patternItems", "=", "null", ";", "}...
Apply the given unlocalized pattern string to this date format.
[ "Apply", "the", "given", "unlocalized", "pattern", "string", "to", "this", "date", "format", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L3833-L3841
35,390
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.applyLocalizedPattern
public void applyLocalizedPattern(String pat) { this.pattern = translatePattern(pat, formatData.localPatternChars, DateFormatSymbols.patternChars); setLocale(null, null); }
java
public void applyLocalizedPattern(String pat) { this.pattern = translatePattern(pat, formatData.localPatternChars, DateFormatSymbols.patternChars); setLocale(null, null); }
[ "public", "void", "applyLocalizedPattern", "(", "String", "pat", ")", "{", "this", ".", "pattern", "=", "translatePattern", "(", "pat", ",", "formatData", ".", "localPatternChars", ",", "DateFormatSymbols", ".", "patternChars", ")", ";", "setLocale", "(", "null"...
Apply the given localized pattern string to this date format.
[ "Apply", "the", "given", "localized", "pattern", "string", "to", "this", "date", "format", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L3846-L3851
35,391
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.formatToCharacterIterator
@Override public AttributedCharacterIterator formatToCharacterIterator(Object obj) { Calendar cal = calendar; if (obj instanceof Calendar) { cal = (Calendar)obj; } else if (obj instanceof Date) { calendar.setTime((Date)obj); } else if (obj instanceof Number) {...
java
@Override public AttributedCharacterIterator formatToCharacterIterator(Object obj) { Calendar cal = calendar; if (obj instanceof Calendar) { cal = (Calendar)obj; } else if (obj instanceof Date) { calendar.setTime((Date)obj); } else if (obj instanceof Number) {...
[ "@", "Override", "public", "AttributedCharacterIterator", "formatToCharacterIterator", "(", "Object", "obj", ")", "{", "Calendar", "cal", "=", "calendar", ";", "if", "(", "obj", "instanceof", "Calendar", ")", "{", "cal", "=", "(", "Calendar", ")", "obj", ";", ...
Format the object to an attributed string, and return the corresponding iterator Overrides superclass method. @param obj The object to format @return <code>AttributedCharacterIterator</code> describing the formatted value.
[ "Format", "the", "object", "to", "an", "attributed", "string", "and", "return", "the", "corresponding", "iterator", "Overrides", "superclass", "method", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L4013-L4040
35,392
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.diffCalFieldValue
private boolean diffCalFieldValue(Calendar fromCalendar, Calendar toCalendar, Object[] items, int i) throws IllegalArgumentException { if ( items[i] instanceof String) { return false; ...
java
private boolean diffCalFieldValue(Calendar fromCalendar, Calendar toCalendar, Object[] items, int i) throws IllegalArgumentException { if ( items[i] instanceof String) { return false; ...
[ "private", "boolean", "diffCalFieldValue", "(", "Calendar", "fromCalendar", ",", "Calendar", "toCalendar", ",", "Object", "[", "]", "items", ",", "int", "i", ")", "throws", "IllegalArgumentException", "{", "if", "(", "items", "[", "i", "]", "instanceof", "Stri...
check whether the i-th item in 2 calendar is in different value. It is supposed to be used only by CLDR survey tool. It is used by intervalFormatByAlgorithm(). @param fromCalendar one calendar @param toCalendar the other calendar @param items pattern items @param i the i-th item in pattern...
[ "check", "whether", "the", "i", "-", "th", "item", "in", "2", "calendar", "is", "in", "different", "value", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L4299-L4324
35,393
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java
SimpleDateFormat.lowerLevel
private boolean lowerLevel(Object[] items, int i, int level) throws IllegalArgumentException { if (items[i] instanceof String) { return false; } PatternItem item = (PatternItem)items[i]; char ch = item.type; int patternCharIndex = getLevelFromChar(...
java
private boolean lowerLevel(Object[] items, int i, int level) throws IllegalArgumentException { if (items[i] instanceof String) { return false; } PatternItem item = (PatternItem)items[i]; char ch = item.type; int patternCharIndex = getLevelFromChar(...
[ "private", "boolean", "lowerLevel", "(", "Object", "[", "]", "items", ",", "int", "i", ",", "int", "level", ")", "throws", "IllegalArgumentException", "{", "if", "(", "items", "[", "i", "]", "instanceof", "String", ")", "{", "return", "false", ";", "}", ...
check whether the i-th item's level is lower than the input 'level' It is supposed to be used only by CLDR survey tool. It is used by intervalFormatByAlgorithm(). @param items the pattern items @param i the i-th item in pattern items @param level the level with which the i-th pattern item compared to @exceptio...
[ "check", "whether", "the", "i", "-", "th", "item", "s", "level", "is", "lower", "than", "the", "input", "level" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SimpleDateFormat.java#L4341-L4359
35,394
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java
ToUnknownStream.addUniqueAttribute
public void addUniqueAttribute(String rawName, String value, int flags) throws SAXException { if (m_firstTagNotEmitted) { flush(); } m_handler.addUniqueAttribute(rawName, value, flags); }
java
public void addUniqueAttribute(String rawName, String value, int flags) throws SAXException { if (m_firstTagNotEmitted) { flush(); } m_handler.addUniqueAttribute(rawName, value, flags); }
[ "public", "void", "addUniqueAttribute", "(", "String", "rawName", ",", "String", "value", ",", "int", "flags", ")", "throws", "SAXException", "{", "if", "(", "m_firstTagNotEmitted", ")", "{", "flush", "(", ")", ";", "}", "m_handler", ".", "addUniqueAttribute",...
Adds a unique attribute to the currenly open tag
[ "Adds", "a", "unique", "attribute", "to", "the", "currenly", "open", "tag" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java#L300-L309
35,395
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java
ToUnknownStream.getPrefixPartUnknown
private String getPrefixPartUnknown(String qname) { final int index = qname.indexOf(':'); return (index > 0) ? qname.substring(0, index) : EMPTYSTRING; }
java
private String getPrefixPartUnknown(String qname) { final int index = qname.indexOf(':'); return (index > 0) ? qname.substring(0, index) : EMPTYSTRING; }
[ "private", "String", "getPrefixPartUnknown", "(", "String", "qname", ")", "{", "final", "int", "index", "=", "qname", ".", "indexOf", "(", "'", "'", ")", ";", "return", "(", "index", ">", "0", ")", "?", "qname", ".", "substring", "(", "0", ",", "inde...
Utility function to return prefix Don't want to override static function on SerializerBase So added Unknown suffix to method name.
[ "Utility", "function", "to", "return", "prefix" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java#L1099-L1103
35,396
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java
ToUnknownStream.getNamespaceMappings
public NamespaceMappings getNamespaceMappings() { NamespaceMappings mappings = null; if (m_handler != null) { mappings = m_handler.getNamespaceMappings(); } return mappings; }
java
public NamespaceMappings getNamespaceMappings() { NamespaceMappings mappings = null; if (m_handler != null) { mappings = m_handler.getNamespaceMappings(); } return mappings; }
[ "public", "NamespaceMappings", "getNamespaceMappings", "(", ")", "{", "NamespaceMappings", "mappings", "=", "null", ";", "if", "(", "m_handler", "!=", "null", ")", "{", "mappings", "=", "m_handler", ".", "getNamespaceMappings", "(", ")", ";", "}", "return", "m...
Get the current namespace mappings. Simply returns the mappings of the wrapped handler. @see ExtendedContentHandler#getNamespaceMappings()
[ "Get", "the", "current", "namespace", "mappings", ".", "Simply", "returns", "the", "mappings", "of", "the", "wrapped", "handler", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java#L1184-L1192
35,397
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExpandedNameTable.java
ExpandedNameTable.initExtendedTypes
private void initExtendedTypes() { m_extendedTypes = new ExtendedType[m_initialSize]; for (int i = 0; i < DTM.NTYPES; i++) { m_extendedTypes[i] = m_defaultExtendedTypes[i]; m_table[i] = new HashEntry(m_defaultExtendedTypes[i], i, i, null); } m_nextType = DTM.NTYPES; }
java
private void initExtendedTypes() { m_extendedTypes = new ExtendedType[m_initialSize]; for (int i = 0; i < DTM.NTYPES; i++) { m_extendedTypes[i] = m_defaultExtendedTypes[i]; m_table[i] = new HashEntry(m_defaultExtendedTypes[i], i, i, null); } m_nextType = DTM.NTYPES; }
[ "private", "void", "initExtendedTypes", "(", ")", "{", "m_extendedTypes", "=", "new", "ExtendedType", "[", "m_initialSize", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "DTM", ".", "NTYPES", ";", "i", "++", ")", "{", "m_extendedTypes", "[...
Initialize the vector of extended types with the basic DOM node types.
[ "Initialize", "the", "vector", "of", "extended", "types", "with", "the", "basic", "DOM", "node", "types", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExpandedNameTable.java#L133-L142
35,398
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExpandedNameTable.java
ExpandedNameTable.getExpandedTypeID
public int getExpandedTypeID(String namespace, String localName, int type) { return getExpandedTypeID(namespace, localName, type, false); }
java
public int getExpandedTypeID(String namespace, String localName, int type) { return getExpandedTypeID(namespace, localName, type, false); }
[ "public", "int", "getExpandedTypeID", "(", "String", "namespace", ",", "String", "localName", ",", "int", "type", ")", "{", "return", "getExpandedTypeID", "(", "namespace", ",", "localName", ",", "type", ",", "false", ")", ";", "}" ]
Given an expanded name represented by namespace, local name and node type, return an ID. If the expanded-name does not exist in the internal tables, the entry will be created, and the ID will be returned. Any additional nodes that are created that have this expanded name will use this ID. @param namespace The namesp...
[ "Given", "an", "expanded", "name", "represented", "by", "namespace", "local", "name", "and", "node", "type", "return", "an", "ID", ".", "If", "the", "expanded", "-", "name", "does", "not", "exist", "in", "the", "internal", "tables", "the", "entry", "will",...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExpandedNameTable.java#L156-L159
35,399
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExpandedNameTable.java
ExpandedNameTable.rehash
private void rehash() { int oldCapacity = m_capacity; HashEntry[] oldTable = m_table; int newCapacity = 2 * oldCapacity + 1; m_capacity = newCapacity; m_threshold = (int)(newCapacity * m_loadFactor); m_table = new HashEntry[newCapacity]; for (int i = oldCapacity-1; i >=0 ; i-...
java
private void rehash() { int oldCapacity = m_capacity; HashEntry[] oldTable = m_table; int newCapacity = 2 * oldCapacity + 1; m_capacity = newCapacity; m_threshold = (int)(newCapacity * m_loadFactor); m_table = new HashEntry[newCapacity]; for (int i = oldCapacity-1; i >=0 ; i-...
[ "private", "void", "rehash", "(", ")", "{", "int", "oldCapacity", "=", "m_capacity", ";", "HashEntry", "[", "]", "oldTable", "=", "m_table", ";", "int", "newCapacity", "=", "2", "*", "oldCapacity", "+", "1", ";", "m_capacity", "=", "newCapacity", ";", "m...
Increases the capacity of and internally reorganizes the hashtable, in order to accommodate and access its entries more efficiently. This method is called when the number of keys in the hashtable exceeds this hashtable's capacity and load factor.
[ "Increases", "the", "capacity", "of", "and", "internally", "reorganizes", "the", "hashtable", "in", "order", "to", "accommodate", "and", "access", "its", "entries", "more", "efficiently", ".", "This", "method", "is", "called", "when", "the", "number", "of", "k...
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/ExpandedNameTable.java#L245-L270