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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
33,400 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.clear | public final void clear(int field)
{
if (areFieldsVirtuallySet) {
computeFields();
}
fields[field] = 0;
stamp[field] = UNSET;
isTimeSet = areFieldsSet = areAllFieldsSet = areFieldsVirtuallySet = false;
} | java | public final void clear(int field)
{
if (areFieldsVirtuallySet) {
computeFields();
}
fields[field] = 0;
stamp[field] = UNSET;
isTimeSet = areFieldsSet = areAllFieldsSet = areFieldsVirtuallySet = false;
} | [
"public",
"final",
"void",
"clear",
"(",
"int",
"field",
")",
"{",
"if",
"(",
"areFieldsVirtuallySet",
")",
"{",
"computeFields",
"(",
")",
";",
"}",
"fields",
"[",
"field",
"]",
"=",
"0",
";",
"stamp",
"[",
"field",
"]",
"=",
"UNSET",
";",
"isTimeSe... | Clears the value in the given time field.
@param field the time field to be cleared. | [
"Clears",
"the",
"value",
"in",
"the",
"given",
"time",
"field",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L2236-L2244 |
33,401 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.compare | private long compare(Object that) {
long thatMs;
if (that instanceof Calendar) {
thatMs = ((Calendar)that).getTimeInMillis();
} else if (that instanceof Date) {
thatMs = ((Date)that).getTime();
} else {
throw new IllegalArgumentException(that + "is not... | java | private long compare(Object that) {
long thatMs;
if (that instanceof Calendar) {
thatMs = ((Calendar)that).getTimeInMillis();
} else if (that instanceof Date) {
thatMs = ((Date)that).getTime();
} else {
throw new IllegalArgumentException(that + "is not... | [
"private",
"long",
"compare",
"(",
"Object",
"that",
")",
"{",
"long",
"thatMs",
";",
"if",
"(",
"that",
"instanceof",
"Calendar",
")",
"{",
"thatMs",
"=",
"(",
"(",
"Calendar",
")",
"that",
")",
".",
"getTimeInMillis",
"(",
")",
";",
"}",
"else",
"i... | Returns the difference in milliseconds between the moment this
calendar is set to and the moment the given calendar or Date object
is set to. | [
"Returns",
"the",
"difference",
"in",
"milliseconds",
"between",
"the",
"moment",
"this",
"calendar",
"is",
"set",
"to",
"and",
"the",
"moment",
"the",
"given",
"calendar",
"or",
"Date",
"object",
"is",
"set",
"to",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L2338-L2348 |
33,402 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.prepareGetActual | protected void prepareGetActual(int field, boolean isMinimum) {
set(MILLISECONDS_IN_DAY, 0);
switch (field) {
case YEAR:
case EXTENDED_YEAR:
set(DAY_OF_YEAR, getGreatestMinimum(DAY_OF_YEAR));
break;
case YEAR_WOY:
set(WEEK_OF_YEAR, getGreates... | java | protected void prepareGetActual(int field, boolean isMinimum) {
set(MILLISECONDS_IN_DAY, 0);
switch (field) {
case YEAR:
case EXTENDED_YEAR:
set(DAY_OF_YEAR, getGreatestMinimum(DAY_OF_YEAR));
break;
case YEAR_WOY:
set(WEEK_OF_YEAR, getGreates... | [
"protected",
"void",
"prepareGetActual",
"(",
"int",
"field",
",",
"boolean",
"isMinimum",
")",
"{",
"set",
"(",
"MILLISECONDS_IN_DAY",
",",
"0",
")",
";",
"switch",
"(",
"field",
")",
"{",
"case",
"YEAR",
":",
"case",
"EXTENDED_YEAR",
":",
"set",
"(",
"... | Prepare this calendar for computing the actual minimum or maximum.
This method modifies this calendar's fields; it is called on a
temporary calendar.
<p>Rationale: The semantics of getActualXxx() is to return the
maximum or minimum value that the given field can take, taking into
account other relevant fields. In gen... | [
"Prepare",
"this",
"calendar",
"for",
"computing",
"the",
"actual",
"minimum",
"or",
"maximum",
".",
"This",
"method",
"modifies",
"this",
"calendar",
"s",
"fields",
";",
"it",
"is",
"called",
"on",
"a",
"temporary",
"calendar",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L2510-L2555 |
33,403 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.getPatternData | private static PatternData getPatternData(ULocale locale, String calType) {
ICUResourceBundle rb =
(ICUResourceBundle) UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, locale);
ICUResourceBundle dtPatternsRb = rb.findWithFallback("calendar/" + calType + "/DateTimePatterns");
... | java | private static PatternData getPatternData(ULocale locale, String calType) {
ICUResourceBundle rb =
(ICUResourceBundle) UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, locale);
ICUResourceBundle dtPatternsRb = rb.findWithFallback("calendar/" + calType + "/DateTimePatterns");
... | [
"private",
"static",
"PatternData",
"getPatternData",
"(",
"ULocale",
"locale",
",",
"String",
"calType",
")",
"{",
"ICUResourceBundle",
"rb",
"=",
"(",
"ICUResourceBundle",
")",
"UResourceBundle",
".",
"getBundleInstance",
"(",
"ICUData",
".",
"ICU_BASE_NAME",
",",... | Retrieves the DateTime patterns and overrides from the resource bundle and generates a
new PatternData object.
@param locale Locale to retrieve.
@param calType Calendar type to retrieve. If not found will fallback to gregorian.
@return PatternData object for this locale and calendarType. | [
"Retrieves",
"the",
"DateTime",
"patterns",
"and",
"overrides",
"from",
"the",
"resource",
"bundle",
"and",
"generates",
"a",
"new",
"PatternData",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L3574-L3598 |
33,404 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.setMinimalDaysInFirstWeek | public void setMinimalDaysInFirstWeek(int value)
{
// Values less than 1 have the same effect as 1; values greater
// than 7 have the same effect as 7. However, we normalize values
// so operator== and so forth work.
if (value < 1) {
value = 1;
} else if (value > ... | java | public void setMinimalDaysInFirstWeek(int value)
{
// Values less than 1 have the same effect as 1; values greater
// than 7 have the same effect as 7. However, we normalize values
// so operator== and so forth work.
if (value < 1) {
value = 1;
} else if (value > ... | [
"public",
"void",
"setMinimalDaysInFirstWeek",
"(",
"int",
"value",
")",
"{",
"// Values less than 1 have the same effect as 1; values greater",
"// than 7 have the same effect as 7. However, we normalize values",
"// so operator== and so forth work.",
"if",
"(",
"value",
"<",
"1",
"... | Sets what the minimal days required in the first week of the year are.
For example, if the first week is defined as one that contains the first
day of the first month of a year, call the method with value 1. If it
must be a full week, use value 7.
@param value the given minimal days required in the first week
of the ye... | [
"Sets",
"what",
"the",
"minimal",
"days",
"required",
"in",
"the",
"first",
"week",
"of",
"the",
"year",
"are",
".",
"For",
"example",
"if",
"the",
"first",
"week",
"is",
"defined",
"as",
"one",
"that",
"contains",
"the",
"first",
"day",
"of",
"the",
"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L4209-L4223 |
33,405 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.getLimit | protected int getLimit(int field, int limitType) {
switch (field) {
case DAY_OF_WEEK:
case AM_PM:
case HOUR:
case HOUR_OF_DAY:
case MINUTE:
case SECOND:
case MILLISECOND:
case ZONE_OFFSET:
case DST_OFFSET:
case DOW_LOCAL:
ca... | java | protected int getLimit(int field, int limitType) {
switch (field) {
case DAY_OF_WEEK:
case AM_PM:
case HOUR:
case HOUR_OF_DAY:
case MINUTE:
case SECOND:
case MILLISECOND:
case ZONE_OFFSET:
case DST_OFFSET:
case DOW_LOCAL:
ca... | [
"protected",
"int",
"getLimit",
"(",
"int",
"field",
",",
"int",
"limitType",
")",
"{",
"switch",
"(",
"field",
")",
"{",
"case",
"DAY_OF_WEEK",
":",
"case",
"AM_PM",
":",
"case",
"HOUR",
":",
"case",
"HOUR_OF_DAY",
":",
"case",
"MINUTE",
":",
"case",
... | Returns a limit for a field.
@param field the field, from 0..<code>getFieldCount()-1</code>
@param limitType the type specifier for the limit
@see #MINIMUM
@see #GREATEST_MINIMUM
@see #LEAST_MAXIMUM
@see #MAXIMUM | [
"Returns",
"a",
"limit",
"for",
"a",
"field",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L4296-L4334 |
33,406 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.updateTime | private void updateTime() {
computeTime();
// If we are lenient, we need to recompute the fields to normalize
// the values. Also, if we haven't set all the fields yet (i.e.,
// in a newly-created object), we need to fill in the fields. [LIU]
if (isLenient() || !areAllFieldsSet)... | java | private void updateTime() {
computeTime();
// If we are lenient, we need to recompute the fields to normalize
// the values. Also, if we haven't set all the fields yet (i.e.,
// in a newly-created object), we need to fill in the fields. [LIU]
if (isLenient() || !areAllFieldsSet)... | [
"private",
"void",
"updateTime",
"(",
")",
"{",
"computeTime",
"(",
")",
";",
"// If we are lenient, we need to recompute the fields to normalize",
"// the values. Also, if we haven't set all the fields yet (i.e.,",
"// in a newly-created object), we need to fill in the fields. [LIU]",
"i... | Recompute the time and update the status fields isTimeSet
and areFieldsSet. Callers should check isTimeSet and only
call this method if isTimeSet is false. | [
"Recompute",
"the",
"time",
"and",
"update",
"the",
"status",
"fields",
"isTimeSet",
"and",
"areFieldsSet",
".",
"Callers",
"should",
"check",
"isTimeSet",
"and",
"only",
"call",
"this",
"method",
"if",
"isTimeSet",
"is",
"false",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L4797-L4805 |
33,407 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.computeGregorianAndDOWFields | private final void computeGregorianAndDOWFields(int julianDay) {
computeGregorianFields(julianDay);
// Compute day of week: JD 0 = Monday
int dow = fields[DAY_OF_WEEK] = julianDayToDayOfWeek(julianDay);
// Calculate 1-based localized day of week
int dowLocal = dow - getFirstDay... | java | private final void computeGregorianAndDOWFields(int julianDay) {
computeGregorianFields(julianDay);
// Compute day of week: JD 0 = Monday
int dow = fields[DAY_OF_WEEK] = julianDayToDayOfWeek(julianDay);
// Calculate 1-based localized day of week
int dowLocal = dow - getFirstDay... | [
"private",
"final",
"void",
"computeGregorianAndDOWFields",
"(",
"int",
"julianDay",
")",
"{",
"computeGregorianFields",
"(",
"julianDay",
")",
";",
"// Compute day of week: JD 0 = Monday",
"int",
"dow",
"=",
"fields",
"[",
"DAY_OF_WEEK",
"]",
"=",
"julianDayToDayOfWeek... | Compute the Gregorian calendar year, month, and day of month from
the given Julian day. These values are not stored in fields, but in
member variables gregorianXxx. Also compute the DAY_OF_WEEK and
DOW_LOCAL fields. | [
"Compute",
"the",
"Gregorian",
"calendar",
"year",
"month",
"and",
"day",
"of",
"month",
"from",
"the",
"given",
"Julian",
"day",
".",
"These",
"values",
"are",
"not",
"stored",
"in",
"fields",
"but",
"in",
"member",
"variables",
"gregorianXxx",
".",
"Also",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L4920-L4932 |
33,408 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.computeWeekFields | private final void computeWeekFields() {
int eyear = fields[EXTENDED_YEAR];
int dayOfWeek = fields[DAY_OF_WEEK];
int dayOfYear = fields[DAY_OF_YEAR];
// WEEK_OF_YEAR start
// Compute the week of the year. For the Gregorian calendar, valid week
// numbers run from 1 to 5... | java | private final void computeWeekFields() {
int eyear = fields[EXTENDED_YEAR];
int dayOfWeek = fields[DAY_OF_WEEK];
int dayOfYear = fields[DAY_OF_YEAR];
// WEEK_OF_YEAR start
// Compute the week of the year. For the Gregorian calendar, valid week
// numbers run from 1 to 5... | [
"private",
"final",
"void",
"computeWeekFields",
"(",
")",
"{",
"int",
"eyear",
"=",
"fields",
"[",
"EXTENDED_YEAR",
"]",
";",
"int",
"dayOfWeek",
"=",
"fields",
"[",
"DAY_OF_WEEK",
"]",
";",
"int",
"dayOfYear",
"=",
"fields",
"[",
"DAY_OF_YEAR",
"]",
";",... | Compute the fields WEEK_OF_YEAR, YEAR_WOY, WEEK_OF_MONTH,
DAY_OF_WEEK_IN_MONTH, and DOW_LOCAL from EXTENDED_YEAR, YEAR,
DAY_OF_WEEK, and DAY_OF_YEAR. The latter fields are computed by the
subclass based on the calendar system.
<p>The YEAR_WOY field is computed simplistically. It is equal to YEAR
most of the time, bu... | [
"Compute",
"the",
"fields",
"WEEK_OF_YEAR",
"YEAR_WOY",
"WEEK_OF_MONTH",
"DAY_OF_WEEK_IN_MONTH",
"and",
"DOW_LOCAL",
"from",
"EXTENDED_YEAR",
"YEAR",
"DAY_OF_WEEK",
"and",
"DAY_OF_YEAR",
".",
"The",
"latter",
"fields",
"are",
"computed",
"by",
"the",
"subclass",
"base... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L5003-L5063 |
33,409 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.resolveFields | protected int resolveFields(int[][][] precedenceTable) {
int bestField = -1;
int tempBestField;
for (int g=0; g<precedenceTable.length && bestField < 0; ++g) {
int[][] group = precedenceTable[g];
int bestStamp = UNSET;
linesInGroup:
for (int l=... | java | protected int resolveFields(int[][][] precedenceTable) {
int bestField = -1;
int tempBestField;
for (int g=0; g<precedenceTable.length && bestField < 0; ++g) {
int[][] group = precedenceTable[g];
int bestStamp = UNSET;
linesInGroup:
for (int l=... | [
"protected",
"int",
"resolveFields",
"(",
"int",
"[",
"]",
"[",
"]",
"[",
"]",
"precedenceTable",
")",
"{",
"int",
"bestField",
"=",
"-",
"1",
";",
"int",
"tempBestField",
";",
"for",
"(",
"int",
"g",
"=",
"0",
";",
"g",
"<",
"precedenceTable",
".",
... | Given a precedence table, return the newest field combination in
the table, or -1 if none is found.
<p>The precedence table is a 3-dimensional array of integers. It
may be thought of as an array of groups. Each group is an array of
lines. Each line is an array of field numbers. Within a line, if
all fields are set... | [
"Given",
"a",
"precedence",
"table",
"return",
"the",
"newest",
"field",
"combination",
"in",
"the",
"table",
"or",
"-",
"1",
"if",
"none",
"is",
"found",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L5132-L5172 |
33,410 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.newestStamp | protected int newestStamp(int first, int last, int bestStampSoFar) {
int bestStamp = bestStampSoFar;
for (int i=first; i<=last; ++i) {
if (stamp[i] > bestStamp) {
bestStamp = stamp[i];
}
}
return bestStamp;
} | java | protected int newestStamp(int first, int last, int bestStampSoFar) {
int bestStamp = bestStampSoFar;
for (int i=first; i<=last; ++i) {
if (stamp[i] > bestStamp) {
bestStamp = stamp[i];
}
}
return bestStamp;
} | [
"protected",
"int",
"newestStamp",
"(",
"int",
"first",
",",
"int",
"last",
",",
"int",
"bestStampSoFar",
")",
"{",
"int",
"bestStamp",
"=",
"bestStampSoFar",
";",
"for",
"(",
"int",
"i",
"=",
"first",
";",
"i",
"<=",
"last",
";",
"++",
"i",
")",
"{"... | Returns the newest stamp of a given range of fields. | [
"Returns",
"the",
"newest",
"stamp",
"of",
"a",
"given",
"range",
"of",
"fields",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L5177-L5185 |
33,411 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.getImmediatePreviousZoneTransition | private Long getImmediatePreviousZoneTransition(long base) {
Long transitionTime = null;
if (zone instanceof BasicTimeZone) {
TimeZoneTransition transition = ((BasicTimeZone) zone).getPreviousTransition(base, true);
if (transition != null) {
transitionTime = tran... | java | private Long getImmediatePreviousZoneTransition(long base) {
Long transitionTime = null;
if (zone instanceof BasicTimeZone) {
TimeZoneTransition transition = ((BasicTimeZone) zone).getPreviousTransition(base, true);
if (transition != null) {
transitionTime = tran... | [
"private",
"Long",
"getImmediatePreviousZoneTransition",
"(",
"long",
"base",
")",
"{",
"Long",
"transitionTime",
"=",
"null",
";",
"if",
"(",
"zone",
"instanceof",
"BasicTimeZone",
")",
"{",
"TimeZoneTransition",
"transition",
"=",
"(",
"(",
"BasicTimeZone",
")",... | Find the previous zone transtion near the given time.
@param base The base time, inclusive.
@return The time of the previous transition, or null if not found. | [
"Find",
"the",
"previous",
"zone",
"transtion",
"near",
"the",
"given",
"time",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L5369-L5386 |
33,412 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.computeZoneOffset | protected int computeZoneOffset(long millis, int millisInDay) {
int[] offsets = new int[2];
long wall = millis + millisInDay;
if (zone instanceof BasicTimeZone) {
int duplicatedTimeOpt = (repeatedWallTime == WALLTIME_FIRST) ? BasicTimeZone.LOCAL_FORMER : BasicTimeZone.LOCAL_LATTER;
... | java | protected int computeZoneOffset(long millis, int millisInDay) {
int[] offsets = new int[2];
long wall = millis + millisInDay;
if (zone instanceof BasicTimeZone) {
int duplicatedTimeOpt = (repeatedWallTime == WALLTIME_FIRST) ? BasicTimeZone.LOCAL_FORMER : BasicTimeZone.LOCAL_LATTER;
... | [
"protected",
"int",
"computeZoneOffset",
"(",
"long",
"millis",
",",
"int",
"millisInDay",
")",
"{",
"int",
"[",
"]",
"offsets",
"=",
"new",
"int",
"[",
"2",
"]",
";",
"long",
"wall",
"=",
"millis",
"+",
"millisInDay",
";",
"if",
"(",
"zone",
"instance... | This method can assume EXTENDED_YEAR has been set.
@param millis milliseconds of the date fields (local midnight millis)
@param millisInDay milliseconds of the time fields; may be out
or range.
@return total zone offset (raw + DST) for the given moment
@deprecated This method suffers from a potential integer overflow a... | [
"This",
"method",
"can",
"assume",
"EXTENDED_YEAR",
"has",
"been",
"set",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L5531-L5573 |
33,413 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.computeJulianDay | protected int computeJulianDay() {
// We want to see if any of the date fields is newer than the
// JULIAN_DAY. If not, then we use JULIAN_DAY. If so, then we do
// the normal resolution. We only use JULIAN_DAY if it has been
// set by the user. This makes it possible for the caller... | java | protected int computeJulianDay() {
// We want to see if any of the date fields is newer than the
// JULIAN_DAY. If not, then we use JULIAN_DAY. If so, then we do
// the normal resolution. We only use JULIAN_DAY if it has been
// set by the user. This makes it possible for the caller... | [
"protected",
"int",
"computeJulianDay",
"(",
")",
"{",
"// We want to see if any of the date fields is newer than the",
"// JULIAN_DAY. If not, then we use JULIAN_DAY. If so, then we do",
"// the normal resolution. We only use JULIAN_DAY if it has been",
"// set by the user. This makes it poss... | Compute the Julian day number as specified by this calendar's fields. | [
"Compute",
"the",
"Julian",
"day",
"number",
"as",
"specified",
"by",
"this",
"calendar",
"s",
"fields",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L5578-L5602 |
33,414 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java | Calendar.handleGetMonthLength | protected int handleGetMonthLength(int extendedYear, int month) {
return handleComputeMonthStart(extendedYear, month+1, true) -
handleComputeMonthStart(extendedYear, month, true);
} | java | protected int handleGetMonthLength(int extendedYear, int month) {
return handleComputeMonthStart(extendedYear, month+1, true) -
handleComputeMonthStart(extendedYear, month, true);
} | [
"protected",
"int",
"handleGetMonthLength",
"(",
"int",
"extendedYear",
",",
"int",
"month",
")",
"{",
"return",
"handleComputeMonthStart",
"(",
"extendedYear",
",",
"month",
"+",
"1",
",",
"true",
")",
"-",
"handleComputeMonthStart",
"(",
"extendedYear",
",",
"... | Returns the number of days in the given month of the given extended
year of this calendar system. Subclasses should override this
method if they can provide a more correct or more efficient
implementation than the default implementation in Calendar. | [
"Returns",
"the",
"number",
"of",
"days",
"in",
"the",
"given",
"month",
"of",
"the",
"given",
"extended",
"year",
"of",
"this",
"calendar",
"system",
".",
"Subclasses",
"should",
"override",
"this",
"method",
"if",
"they",
"can",
"provide",
"a",
"more",
"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L5648-L5651 |
33,415 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java | SAX2DTM2.getIdForNamespace | public int getIdForNamespace(String uri)
{
int index = m_values.indexOf(uri);
if (index < 0)
{
m_values.addElement(uri);
return m_valueIndex++;
}
else
return index;
} | java | public int getIdForNamespace(String uri)
{
int index = m_values.indexOf(uri);
if (index < 0)
{
m_values.addElement(uri);
return m_valueIndex++;
}
else
return index;
} | [
"public",
"int",
"getIdForNamespace",
"(",
"String",
"uri",
")",
"{",
"int",
"index",
"=",
"m_values",
".",
"indexOf",
"(",
"uri",
")",
";",
"if",
"(",
"index",
"<",
"0",
")",
"{",
"m_values",
".",
"addElement",
"(",
"uri",
")",
";",
"return",
"m_val... | Get a prefix either from the uri mapping, or just make
one up!
@param uri The namespace URI, which may be null.
@return The prefix if there is one, or null. | [
"Get",
"a",
"prefix",
"either",
"from",
"the",
"uri",
"mapping",
"or",
"just",
"make",
"one",
"up!"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java#L2047-L2057 |
33,416 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java | SAX2DTM2.getStringValue | public String getStringValue()
{
int child = _firstch2(ROOTNODE);
if (child == DTM.NULL) return EMPTY_STR;
// optimization: only create StringBuffer if > 1 child
if ((_exptype2(child) == DTM.TEXT_NODE) && (_nextsib2(child) == DTM.NULL))
{
int dataIndex = m_dataOrQName.elementAt(child);
... | java | public String getStringValue()
{
int child = _firstch2(ROOTNODE);
if (child == DTM.NULL) return EMPTY_STR;
// optimization: only create StringBuffer if > 1 child
if ((_exptype2(child) == DTM.TEXT_NODE) && (_nextsib2(child) == DTM.NULL))
{
int dataIndex = m_dataOrQName.elementAt(child);
... | [
"public",
"String",
"getStringValue",
"(",
")",
"{",
"int",
"child",
"=",
"_firstch2",
"(",
"ROOTNODE",
")",
";",
"if",
"(",
"child",
"==",
"DTM",
".",
"NULL",
")",
"return",
"EMPTY_STR",
";",
"// optimization: only create StringBuffer if > 1 child",
"if",
"(",
... | Returns the string value of the entire tree | [
"Returns",
"the",
"string",
"value",
"of",
"the",
"entire",
"tree"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java#L2974-L2992 |
33,417 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java | SAX2DTM2.copyTextNode | protected final void copyTextNode(final int nodeID, SerializationHandler handler)
throws SAXException
{
if (nodeID != DTM.NULL) {
int dataIndex = m_dataOrQName.elementAt(nodeID);
if (dataIndex >= 0) {
m_chars.sendSAXcharacters(handler,
... | java | protected final void copyTextNode(final int nodeID, SerializationHandler handler)
throws SAXException
{
if (nodeID != DTM.NULL) {
int dataIndex = m_dataOrQName.elementAt(nodeID);
if (dataIndex >= 0) {
m_chars.sendSAXcharacters(handler,
... | [
"protected",
"final",
"void",
"copyTextNode",
"(",
"final",
"int",
"nodeID",
",",
"SerializationHandler",
"handler",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"nodeID",
"!=",
"DTM",
".",
"NULL",
")",
"{",
"int",
"dataIndex",
"=",
"m_dataOrQName",
".",
"... | Copy the String value of a Text node to a SerializationHandler | [
"Copy",
"the",
"String",
"value",
"of",
"a",
"Text",
"node",
"to",
"a",
"SerializationHandler"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java#L3168-L3182 |
33,418 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java | SAX2DTM2.copyElement | protected final String copyElement(int nodeID, int exptype,
SerializationHandler handler)
throws SAXException
{
final ExtendedType extType = m_extendedTypes[exptype];
String uri = extType.getNamespace();
String name = extType.getLocalName();
if... | java | protected final String copyElement(int nodeID, int exptype,
SerializationHandler handler)
throws SAXException
{
final ExtendedType extType = m_extendedTypes[exptype];
String uri = extType.getNamespace();
String name = extType.getLocalName();
if... | [
"protected",
"final",
"String",
"copyElement",
"(",
"int",
"nodeID",
",",
"int",
"exptype",
",",
"SerializationHandler",
"handler",
")",
"throws",
"SAXException",
"{",
"final",
"ExtendedType",
"extType",
"=",
"m_extendedTypes",
"[",
"exptype",
"]",
";",
"String",
... | Copy an Element node to a SerializationHandler.
@param nodeID The node identity
@param exptype The expanded type of the Element node
@param handler The SerializationHandler
@return The qualified name of the Element node. | [
"Copy",
"an",
"Element",
"node",
"to",
"a",
"SerializationHandler",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java#L3192-L3232 |
33,419 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java | SAX2DTM2.copyNS | protected final void copyNS(final int nodeID, SerializationHandler handler, boolean inScope)
throws SAXException
{
// %OPT% Optimization for documents which does not have any explicit
// namespace nodes. For these documents, there is an implicit
// namespace node (xmlns:xml="http://w... | java | protected final void copyNS(final int nodeID, SerializationHandler handler, boolean inScope)
throws SAXException
{
// %OPT% Optimization for documents which does not have any explicit
// namespace nodes. For these documents, there is an implicit
// namespace node (xmlns:xml="http://w... | [
"protected",
"final",
"void",
"copyNS",
"(",
"final",
"int",
"nodeID",
",",
"SerializationHandler",
"handler",
",",
"boolean",
"inScope",
")",
"throws",
"SAXException",
"{",
"// %OPT% Optimization for documents which does not have any explicit",
"// namespace nodes. For these d... | Copy namespace nodes.
@param nodeID The Element node identity
@param handler The SerializationHandler
@param inScope true if all namespaces in scope should be copied,
false if only the namespace declarations should be copied. | [
"Copy",
"namespace",
"nodes",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java#L3242-L3301 |
33,420 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java | SAX2DTM2.getNextNamespaceNode2 | protected final int getNextNamespaceNode2(int baseID) {
int type;
while ((type = _type2(++baseID)) == DTM.ATTRIBUTE_NODE);
if (type == DTM.NAMESPACE_NODE)
return baseID;
else
return NULL;
} | java | protected final int getNextNamespaceNode2(int baseID) {
int type;
while ((type = _type2(++baseID)) == DTM.ATTRIBUTE_NODE);
if (type == DTM.NAMESPACE_NODE)
return baseID;
else
return NULL;
} | [
"protected",
"final",
"int",
"getNextNamespaceNode2",
"(",
"int",
"baseID",
")",
"{",
"int",
"type",
";",
"while",
"(",
"(",
"type",
"=",
"_type2",
"(",
"++",
"baseID",
")",
")",
"==",
"DTM",
".",
"ATTRIBUTE_NODE",
")",
";",
"if",
"(",
"type",
"==",
... | Return the next namespace node following the given base node.
@baseID The node identity of the base node, which can be an
element, attribute or namespace node.
@return The namespace node immediately following the base node. | [
"Return",
"the",
"next",
"namespace",
"node",
"following",
"the",
"given",
"base",
"node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java#L3310-L3318 |
33,421 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java | SAX2DTM2.copyAttributes | protected final void copyAttributes(final int nodeID, SerializationHandler handler)
throws SAXException{
for(int current = getFirstAttributeIdentity(nodeID); current != DTM.NULL; current = getNextAttributeIdentity(current)){
int eType = _exptype2(current);
copyAttribute(current, ... | java | protected final void copyAttributes(final int nodeID, SerializationHandler handler)
throws SAXException{
for(int current = getFirstAttributeIdentity(nodeID); current != DTM.NULL; current = getNextAttributeIdentity(current)){
int eType = _exptype2(current);
copyAttribute(current, ... | [
"protected",
"final",
"void",
"copyAttributes",
"(",
"final",
"int",
"nodeID",
",",
"SerializationHandler",
"handler",
")",
"throws",
"SAXException",
"{",
"for",
"(",
"int",
"current",
"=",
"getFirstAttributeIdentity",
"(",
"nodeID",
")",
";",
"current",
"!=",
"... | Copy attribute nodes from an element .
@param nodeID The Element node identity
@param handler The SerializationHandler | [
"Copy",
"attribute",
"nodes",
"from",
"an",
"element",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java#L3326-L3333 |
33,422 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java | SAX2DTM2.copyAttribute | protected final void copyAttribute(int nodeID, int exptype,
SerializationHandler handler)
throws SAXException
{
/*
final String uri = getNamespaceName(node);
if (uri.length() != 0) {
final String prefix = getPrefix(node);
handler.namesp... | java | protected final void copyAttribute(int nodeID, int exptype,
SerializationHandler handler)
throws SAXException
{
/*
final String uri = getNamespaceName(node);
if (uri.length() != 0) {
final String prefix = getPrefix(node);
handler.namesp... | [
"protected",
"final",
"void",
"copyAttribute",
"(",
"int",
"nodeID",
",",
"int",
"exptype",
",",
"SerializationHandler",
"handler",
")",
"throws",
"SAXException",
"{",
"/*\n final String uri = getNamespaceName(node);\n if (uri.length() != 0) {\n ... | Copy an Attribute node to a SerializationHandler
@param nodeID The node identity
@param exptype The expanded type of the Element node
@param handler The SerializationHandler | [
"Copy",
"an",
"Attribute",
"node",
"to",
"a",
"SerializationHandler"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java#L3344-L3381 |
33,423 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/FilterExprIteratorSimple.java | FilterExprIteratorSimple.executeFilterExpr | public static XNodeSet executeFilterExpr(int context, XPathContext xctxt,
PrefixResolver prefixResolver,
boolean isTopLevel,
int stackFrame,
Expression expr )
throws org.apache.xml.utils.WrappedRuntimeException
{
PrefixResolver savedResolver = xctxt.get... | java | public static XNodeSet executeFilterExpr(int context, XPathContext xctxt,
PrefixResolver prefixResolver,
boolean isTopLevel,
int stackFrame,
Expression expr )
throws org.apache.xml.utils.WrappedRuntimeException
{
PrefixResolver savedResolver = xctxt.get... | [
"public",
"static",
"XNodeSet",
"executeFilterExpr",
"(",
"int",
"context",
",",
"XPathContext",
"xctxt",
",",
"PrefixResolver",
"prefixResolver",
",",
"boolean",
"isTopLevel",
",",
"int",
"stackFrame",
",",
"Expression",
"expr",
")",
"throws",
"org",
".",
"apache... | Execute the expression. Meant for reuse by other FilterExpr iterators
that are not derived from this object. | [
"Execute",
"the",
"expression",
".",
"Meant",
"for",
"reuse",
"by",
"other",
"FilterExpr",
"iterators",
"that",
"are",
"not",
"derived",
"from",
"this",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/FilterExprIteratorSimple.java#L87-L138 |
33,424 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java | DTMDocumentImpl.characters | public void characters(char[] ch, int start, int length)
throws org.xml.sax.SAXException
{
// Actually creating the text node is handled by
// processAccumulatedText(); here we just accumulate the
// characters into the buffer.
m_char.append(ch,start,length);
} | java | public void characters(char[] ch, int start, int length)
throws org.xml.sax.SAXException
{
// Actually creating the text node is handled by
// processAccumulatedText(); here we just accumulate the
// characters into the buffer.
m_char.append(ch,start,length);
} | [
"public",
"void",
"characters",
"(",
"char",
"[",
"]",
"ch",
",",
"int",
"start",
",",
"int",
"length",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"{",
"// Actually creating the text node is handled by",
"// processAccumulatedText(); here we ... | Replaces the deprecated DocumentHandler interface. | [
"Replaces",
"the",
"deprecated",
"DocumentHandler",
"interface",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java#L407-L414 |
33,425 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java | DTMDocumentImpl.processAccumulatedText | private void processAccumulatedText()
{
int len=m_char.length();
if(len!=m_char_current_start)
{
// The FastStringBuffer has been previously agreed upon
appendTextChild(m_char_current_start,len-m_char_current_start);
m_char_current_start=len;
}
} | java | private void processAccumulatedText()
{
int len=m_char.length();
if(len!=m_char_current_start)
{
// The FastStringBuffer has been previously agreed upon
appendTextChild(m_char_current_start,len-m_char_current_start);
m_char_current_start=len;
}
} | [
"private",
"void",
"processAccumulatedText",
"(",
")",
"{",
"int",
"len",
"=",
"m_char",
".",
"length",
"(",
")",
";",
"if",
"(",
"len",
"!=",
"m_char_current_start",
")",
"{",
"// The FastStringBuffer has been previously agreed upon",
"appendTextChild",
"(",
"m_cha... | Flush string accumulation into a text node | [
"Flush",
"string",
"accumulation",
"into",
"a",
"text",
"node"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java#L417-L426 |
33,426 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java | DTMDocumentImpl.getFirstAttribute | public int getFirstAttribute(int nodeHandle) {
nodeHandle &= NODEHANDLE_MASK;
// %REVIEW% jjk: Just a quick observation: If you're going to
// call readEntry repeatedly on the same node, it may be
// more efficiently to do a readSlot to get the data local... | java | public int getFirstAttribute(int nodeHandle) {
nodeHandle &= NODEHANDLE_MASK;
// %REVIEW% jjk: Just a quick observation: If you're going to
// call readEntry repeatedly on the same node, it may be
// more efficiently to do a readSlot to get the data local... | [
"public",
"int",
"getFirstAttribute",
"(",
"int",
"nodeHandle",
")",
"{",
"nodeHandle",
"&=",
"NODEHANDLE_MASK",
";",
"// %REVIEW% jjk: Just a quick observation: If you're going to",
"// call readEntry repeatedly on the same node, it may be",
"// more efficiently to do a readSlot to get ... | Given a node handle, get the index of the node's first attribute.
@param nodeHandle int Handle of the Element node.
@return Handle of first attribute, or DTM.NULL to indicate none exists. | [
"Given",
"a",
"node",
"handle",
"get",
"the",
"index",
"of",
"the",
"node",
"s",
"first",
"attribute",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java#L1112-L1127 |
33,427 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java | DTMDocumentImpl.getNextSibling | public int getNextSibling(int nodeHandle) {
nodeHandle &= NODEHANDLE_MASK;
// Document root has no next sibling
if (nodeHandle == 0)
return NULL;
short type = (short) (nodes.readEntry(nodeHandle, 0) & 0xFFFF);
if ((... | java | public int getNextSibling(int nodeHandle) {
nodeHandle &= NODEHANDLE_MASK;
// Document root has no next sibling
if (nodeHandle == 0)
return NULL;
short type = (short) (nodes.readEntry(nodeHandle, 0) & 0xFFFF);
if ((... | [
"public",
"int",
"getNextSibling",
"(",
"int",
"nodeHandle",
")",
"{",
"nodeHandle",
"&=",
"NODEHANDLE_MASK",
";",
"// Document root has no next sibling",
"if",
"(",
"nodeHandle",
"==",
"0",
")",
"return",
"NULL",
";",
"short",
"type",
"=",
"(",
"short",
")",
... | Given a node handle, advance to its next sibling.
%TBD% This currently uses the DTM-internal definition of
sibling; eg, the last attr's next sib is the first
child. In the old DTM, the DOM proxy layer provided the
additional logic for the public view. If we're rewriting
for XPath emulation, that test must be done her... | [
"Given",
"a",
"node",
"handle",
"advance",
"to",
"its",
"next",
"sibling",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java#L1164-L1187 |
33,428 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java | DTMDocumentImpl.getNextAttribute | public int getNextAttribute(int nodeHandle) {
nodeHandle &= NODEHANDLE_MASK;
nodes.readSlot(nodeHandle, gotslot);
//%REVIEW% Why are we using short here? There's no storage
//reduction for an automatic variable, especially one used
//so br... | java | public int getNextAttribute(int nodeHandle) {
nodeHandle &= NODEHANDLE_MASK;
nodes.readSlot(nodeHandle, gotslot);
//%REVIEW% Why are we using short here? There's no storage
//reduction for an automatic variable, especially one used
//so br... | [
"public",
"int",
"getNextAttribute",
"(",
"int",
"nodeHandle",
")",
"{",
"nodeHandle",
"&=",
"NODEHANDLE_MASK",
";",
"nodes",
".",
"readSlot",
"(",
"nodeHandle",
",",
"gotslot",
")",
";",
"//%REVIEW% Why are we using short here? There's no storage",
"//reduction for an au... | Given a node handle, advance to the next attribute. If an
element, we advance to its first attribute; if an attr, we advance to
the next attr on the same node.
@param nodeHandle int Handle of the node.
@return int DTM node-number of the resolved attr,
or DTM.NULL to indicate none exists. | [
"Given",
"a",
"node",
"handle",
"advance",
"to",
"the",
"next",
"attribute",
".",
"If",
"an",
"element",
"we",
"advance",
"to",
"its",
"first",
"attribute",
";",
"if",
"an",
"attr",
"we",
"advance",
"to",
"the",
"next",
"attr",
"on",
"the",
"same",
"no... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java#L1222-L1239 |
33,429 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java | DTMDocumentImpl.getNextDescendant | public int getNextDescendant(int subtreeRootHandle, int nodeHandle) {
subtreeRootHandle &= NODEHANDLE_MASK;
nodeHandle &= NODEHANDLE_MASK;
// Document root [Document Node? -- jjk] - no next-sib
if (nodeHandle == 0)
return NULL;
... | java | public int getNextDescendant(int subtreeRootHandle, int nodeHandle) {
subtreeRootHandle &= NODEHANDLE_MASK;
nodeHandle &= NODEHANDLE_MASK;
// Document root [Document Node? -- jjk] - no next-sib
if (nodeHandle == 0)
return NULL;
... | [
"public",
"int",
"getNextDescendant",
"(",
"int",
"subtreeRootHandle",
",",
"int",
"nodeHandle",
")",
"{",
"subtreeRootHandle",
"&=",
"NODEHANDLE_MASK",
";",
"nodeHandle",
"&=",
"NODEHANDLE_MASK",
";",
"// Document root [Document Node? -- jjk] - no next-sib",
"if",
"(",
"... | Given a node handle, advance to its next descendant.
If not yet resolved, waits for more nodes to be added to the document and
tries again.
@param subtreeRootHandle
@param nodeHandle int Handle of the node.
@return handle of next descendant,
or DTM.NULL to indicate none exists. | [
"Given",
"a",
"node",
"handle",
"advance",
"to",
"its",
"next",
"descendant",
".",
"If",
"not",
"yet",
"resolved",
"waits",
"for",
"more",
"nodes",
"to",
"be",
"added",
"to",
"the",
"document",
"and",
"tries",
"again",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java#L1266-L1299 |
33,430 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java | DTMDocumentImpl.getNextPreceding | public int getNextPreceding(int axisContextHandle, int nodeHandle) {
// ###shs copied from Xalan 1, what is this suppose to do?
nodeHandle &= NODEHANDLE_MASK;
while (nodeHandle > 1) {
nodeHandle--;
if (ATTRIBUTE_NODE == (nod... | java | public int getNextPreceding(int axisContextHandle, int nodeHandle) {
// ###shs copied from Xalan 1, what is this suppose to do?
nodeHandle &= NODEHANDLE_MASK;
while (nodeHandle > 1) {
nodeHandle--;
if (ATTRIBUTE_NODE == (nod... | [
"public",
"int",
"getNextPreceding",
"(",
"int",
"axisContextHandle",
",",
"int",
"nodeHandle",
")",
"{",
"// ###shs copied from Xalan 1, what is this suppose to do?",
"nodeHandle",
"&=",
"NODEHANDLE_MASK",
";",
"while",
"(",
"nodeHandle",
">",
"1",
")",
"{",
"nodeHandl... | Given a node handle, advance to the next node on the preceding axis.
@param axisContextHandle the start of the axis that is being traversed.
@param nodeHandle the id of the node.
@return int Node-number of preceding sibling,
or DTM.NULL to indicate none exists. | [
"Given",
"a",
"node",
"handle",
"advance",
"to",
"the",
"next",
"node",
"on",
"the",
"preceding",
"axis",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java#L1322-L1341 |
33,431 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java | DTMDocumentImpl.getLocalNameFromExpandedNameID | public String getLocalNameFromExpandedNameID(int ExpandedNameID) {
// Get expanded name
String expandedName = m_localNames.indexToString(ExpandedNameID);
// Remove prefix from expanded name
int colonpos = expandedName.indexOf(":");
String localName = expandedName.... | java | public String getLocalNameFromExpandedNameID(int ExpandedNameID) {
// Get expanded name
String expandedName = m_localNames.indexToString(ExpandedNameID);
// Remove prefix from expanded name
int colonpos = expandedName.indexOf(":");
String localName = expandedName.... | [
"public",
"String",
"getLocalNameFromExpandedNameID",
"(",
"int",
"ExpandedNameID",
")",
"{",
"// Get expanded name",
"String",
"expandedName",
"=",
"m_localNames",
".",
"indexToString",
"(",
"ExpandedNameID",
")",
";",
"// Remove prefix from expanded name",
"int",
"colonpo... | Given an expanded-name ID, return the local name part.
@param ExpandedNameID an ID that represents an expanded-name.
@return String Local name of this node. | [
"Given",
"an",
"expanded",
"-",
"name",
"ID",
"return",
"the",
"local",
"name",
"part",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java#L1554-L1562 |
33,432 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java | DTMDocumentImpl.appendChild | public void appendChild(int newChild, boolean clone, boolean cloneDepth) {
boolean sameDoc = ((newChild & DOCHANDLE_MASK) == m_docHandle);
if (clone || !sameDoc) {
} else {
}
} | java | public void appendChild(int newChild, boolean clone, boolean cloneDepth) {
boolean sameDoc = ((newChild & DOCHANDLE_MASK) == m_docHandle);
if (clone || !sameDoc) {
} else {
}
} | [
"public",
"void",
"appendChild",
"(",
"int",
"newChild",
",",
"boolean",
"clone",
",",
"boolean",
"cloneDepth",
")",
"{",
"boolean",
"sameDoc",
"=",
"(",
"(",
"newChild",
"&",
"DOCHANDLE_MASK",
")",
"==",
"m_docHandle",
")",
";",
"if",
"(",
"clone",
"||",
... | Append a child to the end of the child list of the current node. Please note that the node
is always cloned if it is owned by another document.
<p>%REVIEW% "End of the document" needs to be defined more clearly.
Does it become the last child of the Document? Of the root element?</p>
@param newChild Must be a valid ne... | [
"Append",
"a",
"child",
"to",
"the",
"end",
"of",
"the",
"child",
"list",
"of",
"the",
"current",
"node",
".",
"Please",
"note",
"that",
"the",
"node",
"is",
"always",
"cloned",
"if",
"it",
"is",
"owned",
"by",
"another",
"document",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java#L2055-L2062 |
33,433 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java | DTMDocumentImpl.appendEndElement | void appendEndElement()
{
// pop up the stacks
if (previousSiblingWasParent)
nodes.writeEntry(previousSibling, 2, NULL);
// Pop parentage
previousSibling = currentParent;
nodes.readSlot(currentParent, gotslot);
currentParent = gotslot[1] & 0xFFFF;
// The element just being finishe... | java | void appendEndElement()
{
// pop up the stacks
if (previousSiblingWasParent)
nodes.writeEntry(previousSibling, 2, NULL);
// Pop parentage
previousSibling = currentParent;
nodes.readSlot(currentParent, gotslot);
currentParent = gotslot[1] & 0xFFFF;
// The element just being finishe... | [
"void",
"appendEndElement",
"(",
")",
"{",
"// pop up the stacks",
"if",
"(",
"previousSiblingWasParent",
")",
"nodes",
".",
"writeEntry",
"(",
"previousSibling",
",",
"2",
",",
"NULL",
")",
";",
"// Pop parentage",
"previousSibling",
"=",
"currentParent",
";",
"n... | Terminate the element currently acting as an insertion point. Subsequent
insertions will occur as the last child of this element's parent. | [
"Terminate",
"the",
"element",
"currently",
"acting",
"as",
"an",
"insertion",
"point",
".",
"Subsequent",
"insertions",
"will",
"occur",
"as",
"the",
"last",
"child",
"of",
"this",
"element",
"s",
"parent",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java#L2316-L2334 |
33,434 | google/j2objc | jre_emul/android/platform/libcore/xml/src/main/java/org/kxml2/io/KXmlParser.java | KXmlParser.readDoctype | private void readDoctype(boolean saveDtdText) throws IOException, XmlPullParserException {
read(START_DOCTYPE);
int startPosition = -1;
if (saveDtdText) {
bufferCapture = new StringBuilder();
startPosition = position;
}
try {
skip();
... | java | private void readDoctype(boolean saveDtdText) throws IOException, XmlPullParserException {
read(START_DOCTYPE);
int startPosition = -1;
if (saveDtdText) {
bufferCapture = new StringBuilder();
startPosition = position;
}
try {
skip();
... | [
"private",
"void",
"readDoctype",
"(",
"boolean",
"saveDtdText",
")",
"throws",
"IOException",
",",
"XmlPullParserException",
"{",
"read",
"(",
"START_DOCTYPE",
")",
";",
"int",
"startPosition",
"=",
"-",
"1",
";",
"if",
"(",
"saveDtdText",
")",
"{",
"bufferCa... | Read the document's DTD. Although this parser is non-validating, the DTD
must be parsed to capture entity values and default attribute values. | [
"Read",
"the",
"document",
"s",
"DTD",
".",
"Although",
"this",
"parser",
"is",
"non",
"-",
"validating",
"the",
"DTD",
"must",
"be",
"parsed",
"to",
"capture",
"entity",
"values",
"and",
"default",
"attribute",
"values",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/xml/src/main/java/org/kxml2/io/KXmlParser.java#L580-L608 |
33,435 | google/j2objc | jre_emul/android/platform/libcore/xml/src/main/java/org/kxml2/io/KXmlParser.java | KXmlParser.nextTag | public int nextTag() throws XmlPullParserException, IOException {
next();
if (type == TEXT && isWhitespace) {
next();
}
if (type != END_TAG && type != START_TAG) {
throw new XmlPullParserException("unexpected type", this, null);
}
return type;
... | java | public int nextTag() throws XmlPullParserException, IOException {
next();
if (type == TEXT && isWhitespace) {
next();
}
if (type != END_TAG && type != START_TAG) {
throw new XmlPullParserException("unexpected type", this, null);
}
return type;
... | [
"public",
"int",
"nextTag",
"(",
")",
"throws",
"XmlPullParserException",
",",
"IOException",
"{",
"next",
"(",
")",
";",
"if",
"(",
"type",
"==",
"TEXT",
"&&",
"isWhitespace",
")",
"{",
"next",
"(",
")",
";",
"}",
"if",
"(",
"type",
"!=",
"END_TAG",
... | utility methods to make XML parsing easier ... | [
"utility",
"methods",
"to",
"make",
"XML",
"parsing",
"easier",
"..."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/xml/src/main/java/org/kxml2/io/KXmlParser.java#L2049-L2060 |
33,436 | google/j2objc | jre_emul/android/platform/libcore/xml/src/main/java/org/kxml2/io/KXmlParser.java | KXmlParser.popContentSource | private void popContentSource() {
buffer = nextContentSource.buffer;
position = nextContentSource.position;
limit = nextContentSource.limit;
nextContentSource = nextContentSource.next;
} | java | private void popContentSource() {
buffer = nextContentSource.buffer;
position = nextContentSource.position;
limit = nextContentSource.limit;
nextContentSource = nextContentSource.next;
} | [
"private",
"void",
"popContentSource",
"(",
")",
"{",
"buffer",
"=",
"nextContentSource",
".",
"buffer",
";",
"position",
"=",
"nextContentSource",
".",
"position",
";",
"limit",
"=",
"nextContentSource",
".",
"limit",
";",
"nextContentSource",
"=",
"nextContentSo... | Replaces the current exhausted buffer with the next buffer in the chain. | [
"Replaces",
"the",
"current",
"exhausted",
"buffer",
"with",
"the",
"next",
"buffer",
"in",
"the",
"chain",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/xml/src/main/java/org/kxml2/io/KXmlParser.java#L2172-L2177 |
33,437 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/RelativeDateFormat.java | RelativeDateFormat.getStringForDay | private String getStringForDay(int day) {
if(fDates == null) {
loadDates();
}
for(URelativeString dayItem : fDates) {
if(dayItem.offset == day) {
return dayItem.string;
}
}
return null;
} | java | private String getStringForDay(int day) {
if(fDates == null) {
loadDates();
}
for(URelativeString dayItem : fDates) {
if(dayItem.offset == day) {
return dayItem.string;
}
}
return null;
} | [
"private",
"String",
"getStringForDay",
"(",
"int",
"day",
")",
"{",
"if",
"(",
"fDates",
"==",
"null",
")",
"{",
"loadDates",
"(",
")",
";",
"}",
"for",
"(",
"URelativeString",
"dayItem",
":",
"fDates",
")",
"{",
"if",
"(",
"dayItem",
".",
"offset",
... | Get the string at a specific offset.
@param day day offset ( -1, 0, 1, etc.. ). Does not require sorting by offset.
@return the string, or NULL if none at that location. | [
"Get",
"the",
"string",
"at",
"a",
"specific",
"offset",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/RelativeDateFormat.java#L237-L247 |
33,438 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/RelativeDateFormat.java | RelativeDateFormat.loadDates | private synchronized void loadDates() {
ICUResourceBundle rb = (ICUResourceBundle) UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, fLocale);
// Use sink mechanism to traverse data structure.
fDates = new ArrayList<URelativeString>();
RelDateFmtDataSink sink = new RelDateFmtData... | java | private synchronized void loadDates() {
ICUResourceBundle rb = (ICUResourceBundle) UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, fLocale);
// Use sink mechanism to traverse data structure.
fDates = new ArrayList<URelativeString>();
RelDateFmtDataSink sink = new RelDateFmtData... | [
"private",
"synchronized",
"void",
"loadDates",
"(",
")",
"{",
"ICUResourceBundle",
"rb",
"=",
"(",
"ICUResourceBundle",
")",
"UResourceBundle",
".",
"getBundleInstance",
"(",
"ICUData",
".",
"ICU_BASE_NAME",
",",
"fLocale",
")",
";",
"// Use sink mechanism to travers... | Load the Date string array | [
"Load",
"the",
"Date",
"string",
"array"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/RelativeDateFormat.java#L281-L288 |
33,439 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/RelativeDateFormat.java | RelativeDateFormat.initCapitalizationContextInfo | private void initCapitalizationContextInfo(ULocale locale) {
ICUResourceBundle rb = (ICUResourceBundle) UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, locale);
try {
ICUResourceBundle rdb = rb.getWithFallback("contextTransforms/relative");
int[] intVector = rdb.getIntVe... | java | private void initCapitalizationContextInfo(ULocale locale) {
ICUResourceBundle rb = (ICUResourceBundle) UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, locale);
try {
ICUResourceBundle rdb = rb.getWithFallback("contextTransforms/relative");
int[] intVector = rdb.getIntVe... | [
"private",
"void",
"initCapitalizationContextInfo",
"(",
"ULocale",
"locale",
")",
"{",
"ICUResourceBundle",
"rb",
"=",
"(",
"ICUResourceBundle",
")",
"UResourceBundle",
".",
"getBundleInstance",
"(",
"ICUData",
".",
"ICU_BASE_NAME",
",",
"locale",
")",
";",
"try",
... | Set capitalizationOfRelativeUnitsForListOrMenu, capitalizationOfRelativeUnitsForStandAlone | [
"Set",
"capitalizationOfRelativeUnitsForListOrMenu",
"capitalizationOfRelativeUnitsForStandAlone"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/RelativeDateFormat.java#L293-L305 |
33,440 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/RelativeDateFormat.java | RelativeDateFormat.initializeCalendar | private Calendar initializeCalendar(TimeZone zone, ULocale locale) {
if (calendar == null) {
if(zone == null) {
calendar = Calendar.getInstance(locale);
} else {
calendar = Calendar.getInstance(zone, locale);
}
}
return calendar... | java | private Calendar initializeCalendar(TimeZone zone, ULocale locale) {
if (calendar == null) {
if(zone == null) {
calendar = Calendar.getInstance(locale);
} else {
calendar = Calendar.getInstance(zone, locale);
}
}
return calendar... | [
"private",
"Calendar",
"initializeCalendar",
"(",
"TimeZone",
"zone",
",",
"ULocale",
"locale",
")",
"{",
"if",
"(",
"calendar",
"==",
"null",
")",
"{",
"if",
"(",
"zone",
"==",
"null",
")",
"{",
"calendar",
"=",
"Calendar",
".",
"getInstance",
"(",
"loc... | initializes fCalendar from parameters. Returns fCalendar as a convenience.
@param zone Zone to be adopted, or NULL for TimeZone::createDefault().
@param locale Locale of the calendar
@param status Error code
@return the newly constructed fCalendar | [
"initializes",
"fCalendar",
"from",
"parameters",
".",
"Returns",
"fCalendar",
"as",
"a",
"convenience",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/RelativeDateFormat.java#L326-L335 |
33,441 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.setTimeZoneNames | public TimeZoneFormat setTimeZoneNames(TimeZoneNames tznames) {
if (isFrozen()) {
throw new UnsupportedOperationException("Attempt to modify frozen object");
}
_tznames = tznames;
// TimeZoneGenericNames must be changed to utilize the new TimeZoneNames instance.
_gnames ... | java | public TimeZoneFormat setTimeZoneNames(TimeZoneNames tznames) {
if (isFrozen()) {
throw new UnsupportedOperationException("Attempt to modify frozen object");
}
_tznames = tznames;
// TimeZoneGenericNames must be changed to utilize the new TimeZoneNames instance.
_gnames ... | [
"public",
"TimeZoneFormat",
"setTimeZoneNames",
"(",
"TimeZoneNames",
"tznames",
")",
"{",
"if",
"(",
"isFrozen",
"(",
")",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"Attempt to modify frozen object\"",
")",
";",
"}",
"_tznames",
"=",
"tzname... | Sets the time zone display name data to this instance.
@param tznames the time zone display name data.
@return this object.
@throws UnsupportedOperationException when this object is frozen.
@see #getTimeZoneNames() | [
"Sets",
"the",
"time",
"zone",
"display",
"name",
"data",
"to",
"this",
"instance",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L526-L534 |
33,442 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.setGMTOffsetPattern | public TimeZoneFormat setGMTOffsetPattern(GMTOffsetPatternType type, String pattern) {
if (isFrozen()) {
throw new UnsupportedOperationException("Attempt to modify frozen object");
}
if (pattern == null) {
throw new NullPointerException("Null GMT offset pattern");
... | java | public TimeZoneFormat setGMTOffsetPattern(GMTOffsetPatternType type, String pattern) {
if (isFrozen()) {
throw new UnsupportedOperationException("Attempt to modify frozen object");
}
if (pattern == null) {
throw new NullPointerException("Null GMT offset pattern");
... | [
"public",
"TimeZoneFormat",
"setGMTOffsetPattern",
"(",
"GMTOffsetPatternType",
"type",
",",
"String",
"pattern",
")",
"{",
"if",
"(",
"isFrozen",
"(",
")",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"Attempt to modify frozen object\"",
")",
";"... | Sets the offset pattern for the given offset type.
@param type the offset pattern.
@param pattern the pattern string.
@return this object.
@throws IllegalArgumentException when the pattern string does not have required time field letters.
@throws UnsupportedOperationException when this object is frozen.
@see #getGMTOf... | [
"Sets",
"the",
"offset",
"pattern",
"for",
"the",
"given",
"offset",
"type",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L584-L599 |
33,443 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.getGMTOffsetDigits | public String getGMTOffsetDigits() {
StringBuilder buf = new StringBuilder(_gmtOffsetDigits.length);
for (String digit : _gmtOffsetDigits) {
buf.append(digit);
}
return buf.toString();
} | java | public String getGMTOffsetDigits() {
StringBuilder buf = new StringBuilder(_gmtOffsetDigits.length);
for (String digit : _gmtOffsetDigits) {
buf.append(digit);
}
return buf.toString();
} | [
"public",
"String",
"getGMTOffsetDigits",
"(",
")",
"{",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
"_gmtOffsetDigits",
".",
"length",
")",
";",
"for",
"(",
"String",
"digit",
":",
"_gmtOffsetDigits",
")",
"{",
"buf",
".",
"append",
"(",
"digi... | Returns the decimal digit characters used for localized GMT format in a single string
containing from 0 to 9 in the ascending order.
@return the decimal digits for localized GMT format.
@see #setGMTOffsetDigits(String) | [
"Returns",
"the",
"decimal",
"digit",
"characters",
"used",
"for",
"localized",
"GMT",
"format",
"in",
"a",
"single",
"string",
"containing",
"from",
"0",
"to",
"9",
"in",
"the",
"ascending",
"order",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L608-L614 |
33,444 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.setGMTOffsetDigits | public TimeZoneFormat setGMTOffsetDigits(String digits) {
if (isFrozen()) {
throw new UnsupportedOperationException("Attempt to modify frozen object");
}
if (digits == null) {
throw new NullPointerException("Null GMT offset digits");
}
String[] digitArray ... | java | public TimeZoneFormat setGMTOffsetDigits(String digits) {
if (isFrozen()) {
throw new UnsupportedOperationException("Attempt to modify frozen object");
}
if (digits == null) {
throw new NullPointerException("Null GMT offset digits");
}
String[] digitArray ... | [
"public",
"TimeZoneFormat",
"setGMTOffsetDigits",
"(",
"String",
"digits",
")",
"{",
"if",
"(",
"isFrozen",
"(",
")",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"Attempt to modify frozen object\"",
")",
";",
"}",
"if",
"(",
"digits",
"==",
... | Sets the decimal digit characters used for localized GMT format.
@param digits a string contains the decimal digit characters from 0 to 9 n the ascending order.
@return this object.
@throws IllegalArgumentException when the string did not contain ten characters.
@throws UnsupportedOperationException when this object i... | [
"Sets",
"the",
"decimal",
"digit",
"characters",
"used",
"for",
"localized",
"GMT",
"format",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L625-L638 |
33,445 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.formatOffsetISO8601Basic | public final String formatOffsetISO8601Basic(int offset, boolean useUtcIndicator, boolean isShort, boolean ignoreSeconds) {
return formatOffsetISO8601(offset, true, useUtcIndicator, isShort, ignoreSeconds);
} | java | public final String formatOffsetISO8601Basic(int offset, boolean useUtcIndicator, boolean isShort, boolean ignoreSeconds) {
return formatOffsetISO8601(offset, true, useUtcIndicator, isShort, ignoreSeconds);
} | [
"public",
"final",
"String",
"formatOffsetISO8601Basic",
"(",
"int",
"offset",
",",
"boolean",
"useUtcIndicator",
",",
"boolean",
"isShort",
",",
"boolean",
"ignoreSeconds",
")",
"{",
"return",
"formatOffsetISO8601",
"(",
"offset",
",",
"true",
",",
"useUtcIndicator... | Returns the ISO 8601 basic time zone string for the given offset.
For example, "-08", "-0830" and "Z"
@param offset the offset from GMT(UTC) in milliseconds.
@param useUtcIndicator true if ISO 8601 UTC indicator "Z" is used when the offset is 0.
@param isShort true if shortest form is used.
@param ignoreSeconds true i... | [
"Returns",
"the",
"ISO",
"8601",
"basic",
"time",
"zone",
"string",
"for",
"the",
"given",
"offset",
".",
"For",
"example",
"-",
"08",
"-",
"0830",
"and",
"Z"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L718-L720 |
33,446 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.format | public final String format(Style style, TimeZone tz, long date) {
return format(style, tz, date, null);
} | java | public final String format(Style style, TimeZone tz, long date) {
return format(style, tz, date, null);
} | [
"public",
"final",
"String",
"format",
"(",
"Style",
"style",
",",
"TimeZone",
"tz",
",",
"long",
"date",
")",
"{",
"return",
"format",
"(",
"style",
",",
"tz",
",",
"date",
",",
"null",
")",
";",
"}"
] | Returns the display name of the time zone at the given date for
the style.
<p><b>Note</b>: A style may have fallback styles defined. For example,
when <code>GENERIC_LONG</code> is requested, but there is no display name
data available for <code>GENERIC_LONG</code> style, the implementation
may use <code>GENERIC_LOCATI... | [
"Returns",
"the",
"display",
"name",
"of",
"the",
"time",
"zone",
"at",
"the",
"given",
"date",
"for",
"the",
"style",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L803-L805 |
33,447 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.formatOffsetLocalizedGMT | private String formatOffsetLocalizedGMT(int offset, boolean isShort) {
if (offset == 0) {
return _gmtZeroFormat;
}
StringBuilder buf = new StringBuilder();
boolean positive = true;
if (offset < 0) {
offset = -offset;
positive = false;
... | java | private String formatOffsetLocalizedGMT(int offset, boolean isShort) {
if (offset == 0) {
return _gmtZeroFormat;
}
StringBuilder buf = new StringBuilder();
boolean positive = true;
if (offset < 0) {
offset = -offset;
positive = false;
... | [
"private",
"String",
"formatOffsetLocalizedGMT",
"(",
"int",
"offset",
",",
"boolean",
"isShort",
")",
"{",
"if",
"(",
"offset",
"==",
"0",
")",
"{",
"return",
"_gmtZeroFormat",
";",
"}",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
... | Private method used for localized GMT formatting.
@param offset the zone's UTC offset
@param isShort true if the short localized GMT format is desired
@return the localized GMT string | [
"Private",
"method",
"used",
"for",
"localized",
"GMT",
"formatting",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L1565-L1631 |
33,448 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.formatSpecific | private String formatSpecific(TimeZone tz, NameType stdType, NameType dstType, long date, Output<TimeType> timeType) {
assert(stdType == NameType.LONG_STANDARD || stdType == NameType.SHORT_STANDARD);
assert(dstType == NameType.LONG_DAYLIGHT || dstType == NameType.SHORT_DAYLIGHT);
boolean isDayl... | java | private String formatSpecific(TimeZone tz, NameType stdType, NameType dstType, long date, Output<TimeType> timeType) {
assert(stdType == NameType.LONG_STANDARD || stdType == NameType.SHORT_STANDARD);
assert(dstType == NameType.LONG_DAYLIGHT || dstType == NameType.SHORT_DAYLIGHT);
boolean isDayl... | [
"private",
"String",
"formatSpecific",
"(",
"TimeZone",
"tz",
",",
"NameType",
"stdType",
",",
"NameType",
"dstType",
",",
"long",
"date",
",",
"Output",
"<",
"TimeType",
">",
"timeType",
")",
"{",
"assert",
"(",
"stdType",
"==",
"NameType",
".",
"LONG_STAND... | Private method returning the time zone's specific format string.
@param tz the time zone
@param stdType the name type used for standard time
@param dstType the name type used for daylight time
@param date the date
@param timeType when null, actual time type is set
@return the time zone's specific format name string | [
"Private",
"method",
"returning",
"the",
"time",
"zone",
"s",
"specific",
"format",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L1710-L1723 |
33,449 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.formatExemplarLocation | private String formatExemplarLocation(TimeZone tz) {
String location = getTimeZoneNames().getExemplarLocationName(ZoneMeta.getCanonicalCLDRID(tz));
if (location == null) {
// Use "unknown" location
location = getTimeZoneNames().getExemplarLocationName(UNKNOWN_ZONE_ID);
... | java | private String formatExemplarLocation(TimeZone tz) {
String location = getTimeZoneNames().getExemplarLocationName(ZoneMeta.getCanonicalCLDRID(tz));
if (location == null) {
// Use "unknown" location
location = getTimeZoneNames().getExemplarLocationName(UNKNOWN_ZONE_ID);
... | [
"private",
"String",
"formatExemplarLocation",
"(",
"TimeZone",
"tz",
")",
"{",
"String",
"location",
"=",
"getTimeZoneNames",
"(",
")",
".",
"getExemplarLocationName",
"(",
"ZoneMeta",
".",
"getCanonicalCLDRID",
"(",
"tz",
")",
")",
";",
"if",
"(",
"location",
... | Private method returning the time zone's exemplar location string.
This method will never return null.
@param tz the time zone
@return the time zone's exemplar location name. | [
"Private",
"method",
"returning",
"the",
"time",
"zone",
"s",
"exemplar",
"location",
"string",
".",
"This",
"method",
"will",
"never",
"return",
"null",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L1732-L1743 |
33,450 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.getTimeZoneID | private String getTimeZoneID(String tzID, String mzID) {
String id = tzID;
if (id == null) {
assert (mzID != null);
id = _tznames.getReferenceZoneID(mzID, getTargetRegion());
if (id == null) {
throw new IllegalArgumentException("Invalid mzID: " + mzID)... | java | private String getTimeZoneID(String tzID, String mzID) {
String id = tzID;
if (id == null) {
assert (mzID != null);
id = _tznames.getReferenceZoneID(mzID, getTargetRegion());
if (id == null) {
throw new IllegalArgumentException("Invalid mzID: " + mzID)... | [
"private",
"String",
"getTimeZoneID",
"(",
"String",
"tzID",
",",
"String",
"mzID",
")",
"{",
"String",
"id",
"=",
"tzID",
";",
"if",
"(",
"id",
"==",
"null",
")",
"{",
"assert",
"(",
"mzID",
"!=",
"null",
")",
";",
"id",
"=",
"_tznames",
".",
"get... | Private method returns a time zone ID. If tzID is not null, the value of tzID is returned.
If tzID is null, then this method look up a time zone ID for the current region. This is a
small helper method used by the parse implementation method
@param tzID
the time zone ID or null
@param mzID
the meta zone ID or null
@re... | [
"Private",
"method",
"returns",
"a",
"time",
"zone",
"ID",
".",
"If",
"tzID",
"is",
"not",
"null",
"the",
"value",
"of",
"tzID",
"is",
"returned",
".",
"If",
"tzID",
"is",
"null",
"then",
"this",
"method",
"look",
"up",
"a",
"time",
"zone",
"ID",
"fo... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L1758-L1768 |
33,451 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.getTargetRegion | private synchronized String getTargetRegion() {
if (_region == null) {
_region = _locale.getCountry();
if (_region.length() == 0) {
ULocale tmp = ULocale.addLikelySubtags(_locale);
_region = tmp.getCountry();
if (_region.length() == 0) {
... | java | private synchronized String getTargetRegion() {
if (_region == null) {
_region = _locale.getCountry();
if (_region.length() == 0) {
ULocale tmp = ULocale.addLikelySubtags(_locale);
_region = tmp.getCountry();
if (_region.length() == 0) {
... | [
"private",
"synchronized",
"String",
"getTargetRegion",
"(",
")",
"{",
"if",
"(",
"_region",
"==",
"null",
")",
"{",
"_region",
"=",
"_locale",
".",
"getCountry",
"(",
")",
";",
"if",
"(",
"_region",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"ULo... | Private method returning the target region. The target regions is determined by
the locale of this instance. When a generic name is coming from
a meta zone, this region is used for checking if the time zone
is a reference zone of the meta zone.
@return the target region | [
"Private",
"method",
"returning",
"the",
"target",
"region",
".",
"The",
"target",
"regions",
"is",
"determined",
"by",
"the",
"locale",
"of",
"this",
"instance",
".",
"When",
"a",
"generic",
"name",
"is",
"coming",
"from",
"a",
"meta",
"zone",
"this",
"re... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L1778-L1790 |
33,452 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.getTimeType | private TimeType getTimeType(NameType nameType) {
switch (nameType) {
case LONG_STANDARD:
case SHORT_STANDARD:
return TimeType.STANDARD;
case LONG_DAYLIGHT:
case SHORT_DAYLIGHT:
return TimeType.DAYLIGHT;
default:
return TimeType.UNKNO... | java | private TimeType getTimeType(NameType nameType) {
switch (nameType) {
case LONG_STANDARD:
case SHORT_STANDARD:
return TimeType.STANDARD;
case LONG_DAYLIGHT:
case SHORT_DAYLIGHT:
return TimeType.DAYLIGHT;
default:
return TimeType.UNKNO... | [
"private",
"TimeType",
"getTimeType",
"(",
"NameType",
"nameType",
")",
"{",
"switch",
"(",
"nameType",
")",
"{",
"case",
"LONG_STANDARD",
":",
"case",
"SHORT_STANDARD",
":",
"return",
"TimeType",
".",
"STANDARD",
";",
"case",
"LONG_DAYLIGHT",
":",
"case",
"SH... | Returns the time type for the given name type
@param nameType the name type
@return the time type (unknown/standard/daylight) | [
"Returns",
"the",
"time",
"type",
"for",
"the",
"given",
"name",
"type"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L1797-L1810 |
33,453 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.unquote | private static String unquote(String s) {
if (s.indexOf('\'') < 0) {
return s;
}
boolean isPrevQuote = false;
boolean inQuote = false;
StringBuilder buf = new StringBuilder();
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
... | java | private static String unquote(String s) {
if (s.indexOf('\'') < 0) {
return s;
}
boolean isPrevQuote = false;
boolean inQuote = false;
StringBuilder buf = new StringBuilder();
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
... | [
"private",
"static",
"String",
"unquote",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"s",
".",
"indexOf",
"(",
"'",
"'",
")",
"<",
"0",
")",
"{",
"return",
"s",
";",
"}",
"boolean",
"isPrevQuote",
"=",
"false",
";",
"boolean",
"inQuote",
"=",
"false"... | Unquotes the message format style pattern.
@param s the pattern
@return the unquoted pattern string | [
"Unquotes",
"the",
"message",
"format",
"style",
"pattern",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L1837-L1860 |
33,454 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.getTimeZoneForOffset | private TimeZone getTimeZoneForOffset(int offset) {
if (offset == 0) {
// when offset is 0, we should use "Etc/GMT"
return TimeZone.getTimeZone(TZID_GMT);
}
return ZoneMeta.getCustomTimeZone(offset);
} | java | private TimeZone getTimeZoneForOffset(int offset) {
if (offset == 0) {
// when offset is 0, we should use "Etc/GMT"
return TimeZone.getTimeZone(TZID_GMT);
}
return ZoneMeta.getCustomTimeZone(offset);
} | [
"private",
"TimeZone",
"getTimeZoneForOffset",
"(",
"int",
"offset",
")",
"{",
"if",
"(",
"offset",
"==",
"0",
")",
"{",
"// when offset is 0, we should use \"Etc/GMT\"",
"return",
"TimeZone",
".",
"getTimeZone",
"(",
"TZID_GMT",
")",
";",
"}",
"return",
"ZoneMeta... | Creates an instance of TimeZone for the given offset
@param offset the offset
@return A TimeZone with the given offset | [
"Creates",
"an",
"instance",
"of",
"TimeZone",
"for",
"the",
"given",
"offset"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L2110-L2116 |
33,455 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.parseOffsetLocalizedGMTPattern | private int parseOffsetLocalizedGMTPattern(String text, int start, boolean isShort, int[] parsedLen) {
int idx = start;
int offset = 0;
boolean parsed = false;
do {
// Prefix part
int len = _gmtPatternPrefix.length();
if (len > 0 && !text.regionMatche... | java | private int parseOffsetLocalizedGMTPattern(String text, int start, boolean isShort, int[] parsedLen) {
int idx = start;
int offset = 0;
boolean parsed = false;
do {
// Prefix part
int len = _gmtPatternPrefix.length();
if (len > 0 && !text.regionMatche... | [
"private",
"int",
"parseOffsetLocalizedGMTPattern",
"(",
"String",
"text",
",",
"int",
"start",
",",
"boolean",
"isShort",
",",
"int",
"[",
"]",
"parsedLen",
")",
"{",
"int",
"idx",
"=",
"start",
";",
"int",
"offset",
"=",
"0",
";",
"boolean",
"parsed",
... | Parse localized GMT format generated by the pattern used by this formatter, except
GMT Zero format.
@param text the input text
@param start the start index
@param isShort true if the short localized GMT format is parsed.
@param parsedLen the parsed length, or 0 on failure.
@return the parsed offset in milliseconds. | [
"Parse",
"localized",
"GMT",
"format",
"generated",
"by",
"the",
"pattern",
"used",
"by",
"this",
"formatter",
"except",
"GMT",
"Zero",
"format",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L2196-L2231 |
33,456 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.parseOffsetFields | private int parseOffsetFields(String text, int start, boolean isShort, int[] parsedLen) {
int outLen = 0;
int offset = 0;
int sign = 1;
if (parsedLen != null && parsedLen.length >= 1) {
parsedLen[0] = 0;
}
int offsetH, offsetM, offsetS;
offsetH = off... | java | private int parseOffsetFields(String text, int start, boolean isShort, int[] parsedLen) {
int outLen = 0;
int offset = 0;
int sign = 1;
if (parsedLen != null && parsedLen.length >= 1) {
parsedLen[0] = 0;
}
int offsetH, offsetM, offsetS;
offsetH = off... | [
"private",
"int",
"parseOffsetFields",
"(",
"String",
"text",
",",
"int",
"start",
",",
"boolean",
"isShort",
",",
"int",
"[",
"]",
"parsedLen",
")",
"{",
"int",
"outLen",
"=",
"0",
";",
"int",
"offset",
"=",
"0",
";",
"int",
"sign",
"=",
"1",
";",
... | Parses localized GMT offset fields into offset.
@param text the input text
@param start the start index
@param isShort true if this is a short format - currently not used
@param parsedLen the parsed length, or 0 on failure.
@return the parsed offset in milliseconds. | [
"Parses",
"localized",
"GMT",
"offset",
"fields",
"into",
"offset",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L2242-L2305 |
33,457 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.parseOffsetFieldsWithPattern | private int parseOffsetFieldsWithPattern(String text, int start, Object[] patternItems, boolean forceSingleHourDigit, int fields[]) {
assert (fields != null && fields.length >= 3);
fields[0] = fields[1] = fields[2] = 0;
boolean failed = false;
int offsetH, offsetM, offsetS;
offs... | java | private int parseOffsetFieldsWithPattern(String text, int start, Object[] patternItems, boolean forceSingleHourDigit, int fields[]) {
assert (fields != null && fields.length >= 3);
fields[0] = fields[1] = fields[2] = 0;
boolean failed = false;
int offsetH, offsetM, offsetS;
offs... | [
"private",
"int",
"parseOffsetFieldsWithPattern",
"(",
"String",
"text",
",",
"int",
"start",
",",
"Object",
"[",
"]",
"patternItems",
",",
"boolean",
"forceSingleHourDigit",
",",
"int",
"fields",
"[",
"]",
")",
"{",
"assert",
"(",
"fields",
"!=",
"null",
"&... | Parses localized GMT offset fields with the given pattern
@param text the input text
@param start the start index
@param patternItems the pattern (already itemized)
@param forceSingleHourDigit true if hours field is parsed as a single digit
@param fields receives the parsed hours/minutes/seconds
@return parsed length | [
"Parses",
"localized",
"GMT",
"offset",
"fields",
"with",
"the",
"given",
"pattern"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L2317-L2365 |
33,458 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.parseDefaultOffsetFields | private int parseDefaultOffsetFields(String text, int start, char separator, int[] parsedLen) {
int max = text.length();
int idx = start;
int[] len = {0};
int hour = 0, min = 0, sec = 0;
do {
hour = parseOffsetFieldWithLocalizedDigits(text, idx, 1, 2, 0, MAX_OFFSET_H... | java | private int parseDefaultOffsetFields(String text, int start, char separator, int[] parsedLen) {
int max = text.length();
int idx = start;
int[] len = {0};
int hour = 0, min = 0, sec = 0;
do {
hour = parseOffsetFieldWithLocalizedDigits(text, idx, 1, 2, 0, MAX_OFFSET_H... | [
"private",
"int",
"parseDefaultOffsetFields",
"(",
"String",
"text",
",",
"int",
"start",
",",
"char",
"separator",
",",
"int",
"[",
"]",
"parsedLen",
")",
"{",
"int",
"max",
"=",
"text",
".",
"length",
"(",
")",
";",
"int",
"idx",
"=",
"start",
";",
... | Parses the input GMT offset fields with the default offset pattern.
@param text the input text
@param start the start index
@param separator the separator character, e.g. ':'
@param parsedLen the parsed length, or 0 on failure.
@return the parsed offset in milliseconds. | [
"Parses",
"the",
"input",
"GMT",
"offset",
"fields",
"with",
"the",
"default",
"offset",
"pattern",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L2446-L2483 |
33,459 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.parseSingleLocalizedDigit | private int parseSingleLocalizedDigit(String text, int start, int[] len) {
int digit = -1;
len[0] = 0;
if (start < text.length()) {
int cp = Character.codePointAt(text, start);
// First, try digits configured for this instance
for (int i = 0; i < _gmtOffsetDi... | java | private int parseSingleLocalizedDigit(String text, int start, int[] len) {
int digit = -1;
len[0] = 0;
if (start < text.length()) {
int cp = Character.codePointAt(text, start);
// First, try digits configured for this instance
for (int i = 0; i < _gmtOffsetDi... | [
"private",
"int",
"parseSingleLocalizedDigit",
"(",
"String",
"text",
",",
"int",
"start",
",",
"int",
"[",
"]",
"len",
")",
"{",
"int",
"digit",
"=",
"-",
"1",
";",
"len",
"[",
"0",
"]",
"=",
"0",
";",
"if",
"(",
"start",
"<",
"text",
".",
"leng... | Reads a single decimal digit, either localized digits used by this object
or any Unicode numeric character.
@param text the text
@param start the start index
@param len the actual length read from the text
the start index is not a decimal number.
@return the integer value of the parsed digit, or -1 on failure. | [
"Reads",
"a",
"single",
"decimal",
"digit",
"either",
"localized",
"digits",
"used",
"by",
"this",
"object",
"or",
"any",
"Unicode",
"numeric",
"character",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L2618-L2641 |
33,460 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.parseZoneID | private static String parseZoneID(String text, ParsePosition pos) {
String resolvedID = null;
if (ZONE_ID_TRIE == null) {
synchronized (TimeZoneFormat.class) {
if (ZONE_ID_TRIE == null) {
// Build zone ID trie
TextTrieMap<String> trie =... | java | private static String parseZoneID(String text, ParsePosition pos) {
String resolvedID = null;
if (ZONE_ID_TRIE == null) {
synchronized (TimeZoneFormat.class) {
if (ZONE_ID_TRIE == null) {
// Build zone ID trie
TextTrieMap<String> trie =... | [
"private",
"static",
"String",
"parseZoneID",
"(",
"String",
"text",
",",
"ParsePosition",
"pos",
")",
"{",
"String",
"resolvedID",
"=",
"null",
";",
"if",
"(",
"ZONE_ID_TRIE",
"==",
"null",
")",
"{",
"synchronized",
"(",
"TimeZoneFormat",
".",
"class",
")",... | Parse a zone ID.
@param text the text contains a time zone ID string at the position.
@param pos the position.
@return The zone ID parsed. | [
"Parse",
"a",
"zone",
"ID",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L2928-L2958 |
33,461 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.parseShortZoneID | private static String parseShortZoneID(String text, ParsePosition pos) {
String resolvedID = null;
if (SHORT_ZONE_ID_TRIE == null) {
synchronized (TimeZoneFormat.class) {
if (SHORT_ZONE_ID_TRIE == null) {
// Build short zone ID trie
Tex... | java | private static String parseShortZoneID(String text, ParsePosition pos) {
String resolvedID = null;
if (SHORT_ZONE_ID_TRIE == null) {
synchronized (TimeZoneFormat.class) {
if (SHORT_ZONE_ID_TRIE == null) {
// Build short zone ID trie
Tex... | [
"private",
"static",
"String",
"parseShortZoneID",
"(",
"String",
"text",
",",
"ParsePosition",
"pos",
")",
"{",
"String",
"resolvedID",
"=",
"null",
";",
"if",
"(",
"SHORT_ZONE_ID_TRIE",
"==",
"null",
")",
"{",
"synchronized",
"(",
"TimeZoneFormat",
".",
"cla... | Parse a short zone ID.
@param text the text contains a time zone ID string at the position.
@param pos the position.
@return The zone ID for the parsed short zone ID. | [
"Parse",
"a",
"short",
"zone",
"ID",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L2966-L2997 |
33,462 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java | TimeZoneFormat.parseExemplarLocation | private String parseExemplarLocation(String text, ParsePosition pos) {
int startIdx = pos.getIndex();
int parsedPos = -1;
String tzID = null;
EnumSet<NameType> nameTypes = EnumSet.of(NameType.EXEMPLAR_LOCATION);
Collection<MatchInfo> exemplarMatches = _tznames.find(text, startId... | java | private String parseExemplarLocation(String text, ParsePosition pos) {
int startIdx = pos.getIndex();
int parsedPos = -1;
String tzID = null;
EnumSet<NameType> nameTypes = EnumSet.of(NameType.EXEMPLAR_LOCATION);
Collection<MatchInfo> exemplarMatches = _tznames.find(text, startId... | [
"private",
"String",
"parseExemplarLocation",
"(",
"String",
"text",
",",
"ParsePosition",
"pos",
")",
"{",
"int",
"startIdx",
"=",
"pos",
".",
"getIndex",
"(",
")",
";",
"int",
"parsedPos",
"=",
"-",
"1",
";",
"String",
"tzID",
"=",
"null",
";",
"EnumSe... | Parse an exemplar location string.
@param text the text contains an exemplar location string at the position.
@param pos the position.
@return The zone ID for the parsed exemplar location. | [
"Parse",
"an",
"exemplar",
"location",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TimeZoneFormat.java#L3005-L3030 |
33,463 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java | AlphabeticIndex.initLabels | private List<String> initLabels() {
Normalizer2 nfkdNormalizer = Normalizer2.getNFKDInstance();
List<String> indexCharacters = new ArrayList<String>();
String firstScriptBoundary = firstCharsInScripts.get(0);
String overflowBoundary = firstCharsInScripts.get(firstCharsInScripts.size() -... | java | private List<String> initLabels() {
Normalizer2 nfkdNormalizer = Normalizer2.getNFKDInstance();
List<String> indexCharacters = new ArrayList<String>();
String firstScriptBoundary = firstCharsInScripts.get(0);
String overflowBoundary = firstCharsInScripts.get(firstCharsInScripts.size() -... | [
"private",
"List",
"<",
"String",
">",
"initLabels",
"(",
")",
"{",
"Normalizer2",
"nfkdNormalizer",
"=",
"Normalizer2",
".",
"getNFKDInstance",
"(",
")",
";",
"List",
"<",
"String",
">",
"indexCharacters",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
... | Determine the best labels to use. This is based on the exemplars, but we also process to make sure that they are unique,
and sort differently, and that the overall list is small enough. | [
"Determine",
"the",
"best",
"labels",
"to",
"use",
".",
"This",
"is",
"based",
"on",
"the",
"exemplars",
"but",
"we",
"also",
"process",
"to",
"make",
"sure",
"that",
"they",
"are",
"unique",
"and",
"sort",
"differently",
"and",
"that",
"the",
"overall",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java#L425-L488 |
33,464 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java | AlphabeticIndex.addIndexExemplars | private void addIndexExemplars(ULocale locale) {
UnicodeSet exemplars = LocaleData.getExemplarSet(locale, 0, LocaleData.ES_INDEX);
if (exemplars != null) {
initialLabels.addAll(exemplars);
return;
}
// The locale data did not include explicit Index characters.
... | java | private void addIndexExemplars(ULocale locale) {
UnicodeSet exemplars = LocaleData.getExemplarSet(locale, 0, LocaleData.ES_INDEX);
if (exemplars != null) {
initialLabels.addAll(exemplars);
return;
}
// The locale data did not include explicit Index characters.
... | [
"private",
"void",
"addIndexExemplars",
"(",
"ULocale",
"locale",
")",
"{",
"UnicodeSet",
"exemplars",
"=",
"LocaleData",
".",
"getExemplarSet",
"(",
"locale",
",",
"0",
",",
"LocaleData",
".",
"ES_INDEX",
")",
";",
"if",
"(",
"exemplars",
"!=",
"null",
")",... | This method is called to get the index exemplars. Normally these come from the locale directly,
but if they aren't available, we have to synthesize them. | [
"This",
"method",
"is",
"called",
"to",
"get",
"the",
"index",
"exemplars",
".",
"Normally",
"these",
"come",
"from",
"the",
"locale",
"directly",
"but",
"if",
"they",
"aren",
"t",
"available",
"we",
"have",
"to",
"synthesize",
"them",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java#L505-L547 |
33,465 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java | AlphabeticIndex.addChineseIndexCharacters | private boolean addChineseIndexCharacters() {
UnicodeSet contractions = new UnicodeSet();
try {
collatorPrimaryOnly.internalAddContractions(BASE.charAt(0), contractions);
} catch (Exception e) {
return false;
}
if (contractions.isEmpty()) { return false; }... | java | private boolean addChineseIndexCharacters() {
UnicodeSet contractions = new UnicodeSet();
try {
collatorPrimaryOnly.internalAddContractions(BASE.charAt(0), contractions);
} catch (Exception e) {
return false;
}
if (contractions.isEmpty()) { return false; }... | [
"private",
"boolean",
"addChineseIndexCharacters",
"(",
")",
"{",
"UnicodeSet",
"contractions",
"=",
"new",
"UnicodeSet",
"(",
")",
";",
"try",
"{",
"collatorPrimaryOnly",
".",
"internalAddContractions",
"(",
"BASE",
".",
"charAt",
"(",
"0",
")",
",",
"contracti... | Add Chinese index characters from the tailoring. | [
"Add",
"Chinese",
"index",
"characters",
"from",
"the",
"tailoring",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java#L552-L571 |
33,466 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java | AlphabeticIndex.buildImmutableIndex | public ImmutableIndex<V> buildImmutableIndex() {
// The current AlphabeticIndex Java code never modifies the bucket list once built.
// If it contains no records, we can use it.
// addRecord() sets buckets=null rather than inserting the new record into it.
BucketList<V> immutableBucketLi... | java | public ImmutableIndex<V> buildImmutableIndex() {
// The current AlphabeticIndex Java code never modifies the bucket list once built.
// If it contains no records, we can use it.
// addRecord() sets buckets=null rather than inserting the new record into it.
BucketList<V> immutableBucketLi... | [
"public",
"ImmutableIndex",
"<",
"V",
">",
"buildImmutableIndex",
"(",
")",
"{",
"// The current AlphabeticIndex Java code never modifies the bucket list once built.",
"// If it contains no records, we can use it.",
"// addRecord() sets buckets=null rather than inserting the new record into it... | Builds an immutable, thread-safe version of this instance, without data records.
@return an immutable index instance | [
"Builds",
"an",
"immutable",
"thread",
"-",
"safe",
"version",
"of",
"this",
"instance",
"without",
"data",
"records",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java#L598-L613 |
33,467 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java | AlphabeticIndex.getBucketLabels | public List<String> getBucketLabels() {
initBuckets();
ArrayList<String> result = new ArrayList<String>();
for (Bucket<V> bucket : buckets) {
result.add(bucket.getLabel());
}
return result;
} | java | public List<String> getBucketLabels() {
initBuckets();
ArrayList<String> result = new ArrayList<String>();
for (Bucket<V> bucket : buckets) {
result.add(bucket.getLabel());
}
return result;
} | [
"public",
"List",
"<",
"String",
">",
"getBucketLabels",
"(",
")",
"{",
"initBuckets",
"(",
")",
";",
"ArrayList",
"<",
"String",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"Bucket",
"<",
"V",
">",
"bucket"... | Get the labels.
@return The list of bucket labels, after processing. | [
"Get",
"the",
"labels",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java#L620-L627 |
33,468 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java | AlphabeticIndex.clearRecords | public AlphabeticIndex<V> clearRecords() {
if (inputList != null && !inputList.isEmpty()) {
inputList.clear();
buckets = null;
}
return this;
} | java | public AlphabeticIndex<V> clearRecords() {
if (inputList != null && !inputList.isEmpty()) {
inputList.clear();
buckets = null;
}
return this;
} | [
"public",
"AlphabeticIndex",
"<",
"V",
">",
"clearRecords",
"(",
")",
"{",
"if",
"(",
"inputList",
"!=",
"null",
"&&",
"!",
"inputList",
".",
"isEmpty",
"(",
")",
")",
"{",
"inputList",
".",
"clear",
"(",
")",
";",
"buckets",
"=",
"null",
";",
"}",
... | Clear the index.
@return this, for chaining | [
"Clear",
"the",
"index",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java#L695-L701 |
33,469 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java | AlphabeticIndex.initBuckets | private void initBuckets() {
if (buckets != null) {
return;
}
buckets = createBucketList();
if (inputList == null || inputList.isEmpty()) {
return;
}
// Sort the records by name.
// Stable sort preserves input order of collation duplicates... | java | private void initBuckets() {
if (buckets != null) {
return;
}
buckets = createBucketList();
if (inputList == null || inputList.isEmpty()) {
return;
}
// Sort the records by name.
// Stable sort preserves input order of collation duplicates... | [
"private",
"void",
"initBuckets",
"(",
")",
"{",
"if",
"(",
"buckets",
"!=",
"null",
")",
"{",
"return",
";",
"}",
"buckets",
"=",
"createBucketList",
"(",
")",
";",
"if",
"(",
"inputList",
"==",
"null",
"||",
"inputList",
".",
"isEmpty",
"(",
")",
"... | Creates an index, and buckets and sorts the list of records into the index. | [
"Creates",
"an",
"index",
"and",
"buckets",
"and",
"sorts",
"the",
"list",
"of",
"records",
"into",
"the",
"index",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java#L736-L790 |
33,470 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java | AlphabeticIndex.isOneLabelBetterThanOther | private static boolean isOneLabelBetterThanOther(Normalizer2 nfkdNormalizer, String one, String other) {
// This is called with primary-equal strings, but never with one.equals(other).
String n1 = nfkdNormalizer.normalize(one);
String n2 = nfkdNormalizer.normalize(other);
int result = n1... | java | private static boolean isOneLabelBetterThanOther(Normalizer2 nfkdNormalizer, String one, String other) {
// This is called with primary-equal strings, but never with one.equals(other).
String n1 = nfkdNormalizer.normalize(one);
String n2 = nfkdNormalizer.normalize(other);
int result = n1... | [
"private",
"static",
"boolean",
"isOneLabelBetterThanOther",
"(",
"Normalizer2",
"nfkdNormalizer",
",",
"String",
"one",
",",
"String",
"other",
")",
"{",
"// This is called with primary-equal strings, but never with one.equals(other).",
"String",
"n1",
"=",
"nfkdNormalizer",
... | Returns true if one index character string is "better" than the other.
Shorter NFKD is better, and otherwise NFKD-binary-less-than is
better, and otherwise binary-less-than is better. | [
"Returns",
"true",
"if",
"one",
"index",
"character",
"string",
"is",
"better",
"than",
"the",
"other",
".",
"Shorter",
"NFKD",
"is",
"better",
"and",
"otherwise",
"NFKD",
"-",
"binary",
"-",
"less",
"-",
"than",
"is",
"better",
"and",
"otherwise",
"binary... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java#L799-L812 |
33,471 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java | AlphabeticIndex.getFirstCharactersInScripts | @Deprecated
public List<String> getFirstCharactersInScripts() {
List<String> dest = new ArrayList<String>(200);
// Fetch the script-first-primary contractions which are defined in the root collator.
// They all start with U+FDD1.
UnicodeSet set = new UnicodeSet();
collatorPri... | java | @Deprecated
public List<String> getFirstCharactersInScripts() {
List<String> dest = new ArrayList<String>(200);
// Fetch the script-first-primary contractions which are defined in the root collator.
// They all start with U+FDD1.
UnicodeSet set = new UnicodeSet();
collatorPri... | [
"@",
"Deprecated",
"public",
"List",
"<",
"String",
">",
"getFirstCharactersInScripts",
"(",
")",
"{",
"List",
"<",
"String",
">",
"dest",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
"200",
")",
";",
"// Fetch the script-first-primary contractions which are ... | Return a list of the first character in each script. Only exposed for testing.
@return list of first characters in each script
@deprecated This API is ICU internal, only for testing.
@hide original deprecated declaration
@hide draft / provisional / internal are hidden on Android | [
"Return",
"a",
"list",
"of",
"the",
"first",
"character",
"in",
"each",
"script",
".",
"Only",
"exposed",
"for",
"testing",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/AlphabeticIndex.java#L1192-L1214 |
33,472 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/PipedInputStream.java | PipedInputStream.establishConnection | synchronized void establishConnection() throws IOException {
if (isConnected) {
throw new IOException("Pipe already connected");
}
if (buffer == null) { // We may already have allocated the buffer.
buffer = new byte[PipedInputStream.PIPE_SIZE];
}
isConnect... | java | synchronized void establishConnection() throws IOException {
if (isConnected) {
throw new IOException("Pipe already connected");
}
if (buffer == null) { // We may already have allocated the buffer.
buffer = new byte[PipedInputStream.PIPE_SIZE];
}
isConnect... | [
"synchronized",
"void",
"establishConnection",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"isConnected",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"Pipe already connected\"",
")",
";",
"}",
"if",
"(",
"buffer",
"==",
"null",
")",
"{",
"// We may ... | Establishes the connection to the PipedOutputStream.
@throws IOException
If this Reader is already connected. | [
"Establishes",
"the",
"connection",
"to",
"the",
"PipedOutputStream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/PipedInputStream.java#L181-L189 |
33,473 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java | CompletableFuture.encodeRelay | static Object encodeRelay(Object r) {
Throwable x;
return (((r instanceof AltResult) &&
(x = ((AltResult)r).ex) != null &&
!(x instanceof CompletionException)) ?
new AltResult(new CompletionException(x)) : r);
} | java | static Object encodeRelay(Object r) {
Throwable x;
return (((r instanceof AltResult) &&
(x = ((AltResult)r).ex) != null &&
!(x instanceof CompletionException)) ?
new AltResult(new CompletionException(x)) : r);
} | [
"static",
"Object",
"encodeRelay",
"(",
"Object",
"r",
")",
"{",
"Throwable",
"x",
";",
"return",
"(",
"(",
"(",
"r",
"instanceof",
"AltResult",
")",
"&&",
"(",
"x",
"=",
"(",
"(",
"AltResult",
")",
"r",
")",
".",
"ex",
")",
"!=",
"null",
"&&",
"... | Returns the encoding of a copied outcome; if exceptional,
rewraps as a CompletionException, else returns argument. | [
"Returns",
"the",
"encoding",
"of",
"a",
"copied",
"outcome",
";",
"if",
"exceptional",
"rewraps",
"as",
"a",
"CompletionException",
"else",
"returns",
"argument",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java#L326-L332 |
33,474 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java | CompletableFuture.postComplete | final void postComplete() {
/*
* On each step, variable f holds current dependents to pop
* and run. It is extended along only one path at a time,
* pushing others to avoid unbounded recursion.
*/
CompletableFuture<?> f = this; Completion h;
while ((h = f.sta... | java | final void postComplete() {
/*
* On each step, variable f holds current dependents to pop
* and run. It is extended along only one path at a time,
* pushing others to avoid unbounded recursion.
*/
CompletableFuture<?> f = this; Completion h;
while ((h = f.sta... | [
"final",
"void",
"postComplete",
"(",
")",
"{",
"/*\n * On each step, variable f holds current dependents to pop\n * and run. It is extended along only one path at a time,\n * pushing others to avoid unbounded recursion.\n */",
"CompletableFuture",
"<",
"?",
">",... | Pops and tries to trigger all reachable dependents. Call only
when known to be done. | [
"Pops",
"and",
"tries",
"to",
"trigger",
"all",
"reachable",
"dependents",
".",
"Call",
"only",
"when",
"known",
"to",
"be",
"done",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java#L464-L485 |
33,475 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java | CompletableFuture.cleanStack | final void cleanStack() {
for (Completion p = null, q = stack; q != null;) {
Completion s = q.next;
if (q.isLive()) {
p = q;
q = s;
}
else if (p == null) {
casStack(q, s);
q = stack;
}
... | java | final void cleanStack() {
for (Completion p = null, q = stack; q != null;) {
Completion s = q.next;
if (q.isLive()) {
p = q;
q = s;
}
else if (p == null) {
casStack(q, s);
q = stack;
}
... | [
"final",
"void",
"cleanStack",
"(",
")",
"{",
"for",
"(",
"Completion",
"p",
"=",
"null",
",",
"q",
"=",
"stack",
";",
"q",
"!=",
"null",
";",
")",
"{",
"Completion",
"s",
"=",
"q",
".",
"next",
";",
"if",
"(",
"q",
".",
"isLive",
"(",
")",
"... | Traverses stack and unlinks dead Completions. | [
"Traverses",
"stack",
"and",
"unlinks",
"dead",
"Completions",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java#L488-L509 |
33,476 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java | CompletableFuture.postFire | final CompletableFuture<T> postFire(CompletableFuture<?> a, int mode) {
if (a != null && a.stack != null) {
if (mode < 0 || a.result == null)
a.cleanStack();
else
a.postComplete();
}
if (result != null && stack != null) {
if (mo... | java | final CompletableFuture<T> postFire(CompletableFuture<?> a, int mode) {
if (a != null && a.stack != null) {
if (mode < 0 || a.result == null)
a.cleanStack();
else
a.postComplete();
}
if (result != null && stack != null) {
if (mo... | [
"final",
"CompletableFuture",
"<",
"T",
">",
"postFire",
"(",
"CompletableFuture",
"<",
"?",
">",
"a",
",",
"int",
"mode",
")",
"{",
"if",
"(",
"a",
"!=",
"null",
"&&",
"a",
".",
"stack",
"!=",
"null",
")",
"{",
"if",
"(",
"mode",
"<",
"0",
"||",... | Post-processing by dependent after successful UniCompletion
tryFire. Tries to clean stack of source a, and then either runs
postComplete or returns this to caller, depending on mode. | [
"Post",
"-",
"processing",
"by",
"dependent",
"after",
"successful",
"UniCompletion",
"tryFire",
".",
"Tries",
"to",
"clean",
"stack",
"of",
"source",
"a",
"and",
"then",
"either",
"runs",
"postComplete",
"or",
"returns",
"this",
"to",
"caller",
"depending",
"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java#L560-L574 |
33,477 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java | CompletableFuture.bipush | final void bipush(CompletableFuture<?> b, BiCompletion<?,?,?> c) {
if (c != null) {
Object r;
while ((r = result) == null && !tryPushStack(c))
lazySetNext(c, null); // clear on failure
if (b != null && b != this && b.result == null) {
Completio... | java | final void bipush(CompletableFuture<?> b, BiCompletion<?,?,?> c) {
if (c != null) {
Object r;
while ((r = result) == null && !tryPushStack(c))
lazySetNext(c, null); // clear on failure
if (b != null && b != this && b.result == null) {
Completio... | [
"final",
"void",
"bipush",
"(",
"CompletableFuture",
"<",
"?",
">",
"b",
",",
"BiCompletion",
"<",
"?",
",",
"?",
",",
"?",
">",
"c",
")",
"{",
"if",
"(",
"c",
"!=",
"null",
")",
"{",
"Object",
"r",
";",
"while",
"(",
"(",
"r",
"=",
"result",
... | Pushes completion to this and b unless both done. | [
"Pushes",
"completion",
"to",
"this",
"and",
"b",
"unless",
"both",
"done",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java#L1069-L1080 |
33,478 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java | CompletableFuture.orpush | final void orpush(CompletableFuture<?> b, BiCompletion<?,?,?> c) {
if (c != null) {
while ((b == null || b.result == null) && result == null) {
if (tryPushStack(c)) {
if (b != null && b != this && b.result == null) {
Completion q = new CoCo... | java | final void orpush(CompletableFuture<?> b, BiCompletion<?,?,?> c) {
if (c != null) {
while ((b == null || b.result == null) && result == null) {
if (tryPushStack(c)) {
if (b != null && b != this && b.result == null) {
Completion q = new CoCo... | [
"final",
"void",
"orpush",
"(",
"CompletableFuture",
"<",
"?",
">",
"b",
",",
"BiCompletion",
"<",
"?",
",",
"?",
",",
"?",
">",
"c",
")",
"{",
"if",
"(",
"c",
"!=",
"null",
")",
"{",
"while",
"(",
"(",
"b",
"==",
"null",
"||",
"b",
".",
"res... | Pushes completion to this and b unless either done. | [
"Pushes",
"completion",
"to",
"this",
"and",
"b",
"unless",
"either",
"done",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java#L1356-L1371 |
33,479 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java | CompletableFuture.timedGet | private Object timedGet(long nanos) throws TimeoutException {
if (Thread.interrupted())
return null;
if (nanos > 0L) {
long d = System.nanoTime() + nanos;
long deadline = (d == 0L) ? 1L : d; // avoid 0
Signaller q = null;
boolean queued = false... | java | private Object timedGet(long nanos) throws TimeoutException {
if (Thread.interrupted())
return null;
if (nanos > 0L) {
long d = System.nanoTime() + nanos;
long deadline = (d == 0L) ? 1L : d; // avoid 0
Signaller q = null;
boolean queued = false... | [
"private",
"Object",
"timedGet",
"(",
"long",
"nanos",
")",
"throws",
"TimeoutException",
"{",
"if",
"(",
"Thread",
".",
"interrupted",
"(",
")",
")",
"return",
"null",
";",
"if",
"(",
"nanos",
">",
"0L",
")",
"{",
"long",
"d",
"=",
"System",
".",
"n... | Returns raw result after waiting, or null if interrupted, or
throws TimeoutException on timeout. | [
"Returns",
"raw",
"result",
"after",
"waiting",
"or",
"null",
"if",
"interrupted",
"or",
"throws",
"TimeoutException",
"on",
"timeout",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java#L1778-L1814 |
33,480 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java | CompletableFuture.get | public T get() throws InterruptedException, ExecutionException {
Object r;
return reportGet((r = result) == null ? waitingGet(true) : r);
} | java | public T get() throws InterruptedException, ExecutionException {
Object r;
return reportGet((r = result) == null ? waitingGet(true) : r);
} | [
"public",
"T",
"get",
"(",
")",
"throws",
"InterruptedException",
",",
"ExecutionException",
"{",
"Object",
"r",
";",
"return",
"reportGet",
"(",
"(",
"r",
"=",
"result",
")",
"==",
"null",
"?",
"waitingGet",
"(",
"true",
")",
":",
"r",
")",
";",
"}"
] | Waits if necessary for this future to complete, and then
returns its result.
@return the result value
@throws CancellationException if this future was cancelled
@throws ExecutionException if this future completed exceptionally
@throws InterruptedException if the current thread was interrupted
while waiting | [
"Waits",
"if",
"necessary",
"for",
"this",
"future",
"to",
"complete",
"and",
"then",
"returns",
"its",
"result",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CompletableFuture.java#L1921-L1924 |
33,481 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/Handler.java | Handler.reportError | protected void reportError(String msg, Exception ex, int code) {
try {
errorManager.error(msg, ex, code);
} catch (Exception ex2) {
System.err.println("Handler.reportError caught:");
ex2.printStackTrace();
}
} | java | protected void reportError(String msg, Exception ex, int code) {
try {
errorManager.error(msg, ex, code);
} catch (Exception ex2) {
System.err.println("Handler.reportError caught:");
ex2.printStackTrace();
}
} | [
"protected",
"void",
"reportError",
"(",
"String",
"msg",
",",
"Exception",
"ex",
",",
"int",
"code",
")",
"{",
"try",
"{",
"errorManager",
".",
"error",
"(",
"msg",
",",
"ex",
",",
"code",
")",
";",
"}",
"catch",
"(",
"Exception",
"ex2",
")",
"{",
... | Protected convenience method to report an error to this Handler's
ErrorManager. Note that this method retrieves and uses the ErrorManager
without doing a security check. It can therefore be used in
environments where the caller may be non-privileged.
@param msg a descriptive string (may be null)
@param ex an ... | [
"Protected",
"convenience",
"method",
"to",
"report",
"an",
"error",
"to",
"this",
"Handler",
"s",
"ErrorManager",
".",
"Note",
"that",
"this",
"method",
"retrieves",
"and",
"uses",
"the",
"ErrorManager",
"without",
"doing",
"a",
"security",
"check",
".",
"It"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/Handler.java#L239-L246 |
33,482 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractShortCircuitTask.java | AbstractShortCircuitTask.compute | @Override
public void compute() {
Spliterator<P_IN> rs = spliterator, ls;
long sizeEstimate = rs.estimateSize();
long sizeThreshold = getTargetSize(sizeEstimate);
boolean forkRight = false;
@SuppressWarnings("unchecked") K task = (K) this;
AtomicReference<R> sr = shar... | java | @Override
public void compute() {
Spliterator<P_IN> rs = spliterator, ls;
long sizeEstimate = rs.estimateSize();
long sizeThreshold = getTargetSize(sizeEstimate);
boolean forkRight = false;
@SuppressWarnings("unchecked") K task = (K) this;
AtomicReference<R> sr = shar... | [
"@",
"Override",
"public",
"void",
"compute",
"(",
")",
"{",
"Spliterator",
"<",
"P_IN",
">",
"rs",
"=",
"spliterator",
",",
"ls",
";",
"long",
"sizeEstimate",
"=",
"rs",
".",
"estimateSize",
"(",
")",
";",
"long",
"sizeThreshold",
"=",
"getTargetSize",
... | Overrides AbstractTask version to include checks for early
exits while splitting or computing. | [
"Overrides",
"AbstractTask",
"version",
"to",
"include",
"checks",
"for",
"early",
"exits",
"while",
"splitting",
"or",
"computing",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractShortCircuitTask.java#L100-L138 |
33,483 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractShortCircuitTask.java | AbstractShortCircuitTask.getLocalResult | @Override
public R getLocalResult() {
if (isRoot()) {
R answer = sharedResult.get();
return (answer == null) ? getEmptyResult() : answer;
}
else
return super.getLocalResult();
} | java | @Override
public R getLocalResult() {
if (isRoot()) {
R answer = sharedResult.get();
return (answer == null) ? getEmptyResult() : answer;
}
else
return super.getLocalResult();
} | [
"@",
"Override",
"public",
"R",
"getLocalResult",
"(",
")",
"{",
"if",
"(",
"isRoot",
"(",
")",
")",
"{",
"R",
"answer",
"=",
"sharedResult",
".",
"get",
"(",
")",
";",
"return",
"(",
"answer",
"==",
"null",
")",
"?",
"getEmptyResult",
"(",
")",
":... | Retrieves the local result for this task. If this task is the root,
retrieves the shared result instead. | [
"Retrieves",
"the",
"local",
"result",
"for",
"this",
"task",
".",
"If",
"this",
"task",
"is",
"the",
"root",
"retrieves",
"the",
"shared",
"result",
"instead",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractShortCircuitTask.java#L183-L191 |
33,484 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractShortCircuitTask.java | AbstractShortCircuitTask.taskCanceled | protected boolean taskCanceled() {
boolean cancel = canceled;
if (!cancel) {
for (K parent = getParent(); !cancel && parent != null; parent = parent.getParent())
cancel = parent.canceled;
}
return cancel;
} | java | protected boolean taskCanceled() {
boolean cancel = canceled;
if (!cancel) {
for (K parent = getParent(); !cancel && parent != null; parent = parent.getParent())
cancel = parent.canceled;
}
return cancel;
} | [
"protected",
"boolean",
"taskCanceled",
"(",
")",
"{",
"boolean",
"cancel",
"=",
"canceled",
";",
"if",
"(",
"!",
"cancel",
")",
"{",
"for",
"(",
"K",
"parent",
"=",
"getParent",
"(",
")",
";",
"!",
"cancel",
"&&",
"parent",
"!=",
"null",
";",
"paren... | Queries whether this task is canceled. A task is considered canceled if
it or any of its parents have been canceled.
@return {@code true} if this task or any parent is canceled. | [
"Queries",
"whether",
"this",
"task",
"is",
"canceled",
".",
"A",
"task",
"is",
"considered",
"canceled",
"if",
"it",
"or",
"any",
"of",
"its",
"parents",
"have",
"been",
"canceled",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractShortCircuitTask.java#L206-L214 |
33,485 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractShortCircuitTask.java | AbstractShortCircuitTask.cancelLaterNodes | protected void cancelLaterNodes() {
// Go up the tree, cancel right siblings of this node and all parents
for (@SuppressWarnings("unchecked") K parent = getParent(), node = (K) this;
parent != null;
node = parent, parent = parent.getParent()) {
// If node is a left ... | java | protected void cancelLaterNodes() {
// Go up the tree, cancel right siblings of this node and all parents
for (@SuppressWarnings("unchecked") K parent = getParent(), node = (K) this;
parent != null;
node = parent, parent = parent.getParent()) {
// If node is a left ... | [
"protected",
"void",
"cancelLaterNodes",
"(",
")",
"{",
"// Go up the tree, cancel right siblings of this node and all parents",
"for",
"(",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"K",
"parent",
"=",
"getParent",
"(",
")",
",",
"node",
"=",
"(",
"K",
")... | Cancels all tasks which succeed this one in the encounter order. This
includes canceling all the current task's right sibling, as well as the
later right siblings of all its parents. | [
"Cancels",
"all",
"tasks",
"which",
"succeed",
"this",
"one",
"in",
"the",
"encounter",
"order",
".",
"This",
"includes",
"canceling",
"all",
"the",
"current",
"task",
"s",
"right",
"sibling",
"as",
"well",
"as",
"the",
"later",
"right",
"siblings",
"of",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractShortCircuitTask.java#L221-L233 |
33,486 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/AnnotationRewriter.java | AnnotationRewriter.createMemberFields | private Map<ExecutableElement, VariableElement> createMemberFields(
AnnotationTypeDeclaration node, List<AnnotationTypeMemberDeclaration> members) {
TypeElement type = node.getTypeElement();
Map<ExecutableElement, VariableElement> fieldElements = new HashMap<>();
for (AnnotationTypeMemberDeclaration m... | java | private Map<ExecutableElement, VariableElement> createMemberFields(
AnnotationTypeDeclaration node, List<AnnotationTypeMemberDeclaration> members) {
TypeElement type = node.getTypeElement();
Map<ExecutableElement, VariableElement> fieldElements = new HashMap<>();
for (AnnotationTypeMemberDeclaration m... | [
"private",
"Map",
"<",
"ExecutableElement",
",",
"VariableElement",
">",
"createMemberFields",
"(",
"AnnotationTypeDeclaration",
"node",
",",
"List",
"<",
"AnnotationTypeMemberDeclaration",
">",
"members",
")",
"{",
"TypeElement",
"type",
"=",
"node",
".",
"getTypeEle... | Create an instance field for each member. | [
"Create",
"an",
"instance",
"field",
"for",
"each",
"member",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/AnnotationRewriter.java#L82-L95 |
33,487 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/AnnotationRewriter.java | AnnotationRewriter.addMemberProperties | private void addMemberProperties(
AnnotationTypeDeclaration node, List<AnnotationTypeMemberDeclaration> members,
Map<ExecutableElement, VariableElement> fieldElements) {
if (members.isEmpty()) {
return;
}
StringBuilder propertyDecls = new StringBuilder();
StringBuilder propertyImpls = ... | java | private void addMemberProperties(
AnnotationTypeDeclaration node, List<AnnotationTypeMemberDeclaration> members,
Map<ExecutableElement, VariableElement> fieldElements) {
if (members.isEmpty()) {
return;
}
StringBuilder propertyDecls = new StringBuilder();
StringBuilder propertyImpls = ... | [
"private",
"void",
"addMemberProperties",
"(",
"AnnotationTypeDeclaration",
"node",
",",
"List",
"<",
"AnnotationTypeMemberDeclaration",
">",
"members",
",",
"Map",
"<",
"ExecutableElement",
",",
"VariableElement",
">",
"fieldElements",
")",
"{",
"if",
"(",
"members",... | Generate the property declarations and synthesize statements. | [
"Generate",
"the",
"property",
"declarations",
"and",
"synthesize",
"statements",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/AnnotationRewriter.java#L98-L122 |
33,488 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/AnnotationRewriter.java | AnnotationRewriter.addDefaultAccessors | private void addDefaultAccessors(
AnnotationTypeDeclaration node, List<AnnotationTypeMemberDeclaration> members) {
TypeElement type = node.getTypeElement();
for (AnnotationTypeMemberDeclaration member : members) {
ExecutableElement memberElement = member.getExecutableElement();
AnnotationValue... | java | private void addDefaultAccessors(
AnnotationTypeDeclaration node, List<AnnotationTypeMemberDeclaration> members) {
TypeElement type = node.getTypeElement();
for (AnnotationTypeMemberDeclaration member : members) {
ExecutableElement memberElement = member.getExecutableElement();
AnnotationValue... | [
"private",
"void",
"addDefaultAccessors",
"(",
"AnnotationTypeDeclaration",
"node",
",",
"List",
"<",
"AnnotationTypeMemberDeclaration",
">",
"members",
")",
"{",
"TypeElement",
"type",
"=",
"node",
".",
"getTypeElement",
"(",
")",
";",
"for",
"(",
"AnnotationTypeMe... | Create accessors for properties that have default values. | [
"Create",
"accessors",
"for",
"properties",
"that",
"have",
"default",
"values",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/AnnotationRewriter.java#L125-L149 |
33,489 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipEntry.java | ZipEntry.setComment | public void setComment(String comment) {
// Android-changed: Explicitly allow null comments (or allow comments to be
// cleared).
if (comment == null) {
this.comment = null;
return;
}
// Android-changed: Explicitly use UTF-8.
if (comment.getBytes(... | java | public void setComment(String comment) {
// Android-changed: Explicitly allow null comments (or allow comments to be
// cleared).
if (comment == null) {
this.comment = null;
return;
}
// Android-changed: Explicitly use UTF-8.
if (comment.getBytes(... | [
"public",
"void",
"setComment",
"(",
"String",
"comment",
")",
"{",
"// Android-changed: Explicitly allow null comments (or allow comments to be",
"// cleared).",
"if",
"(",
"comment",
"==",
"null",
")",
"{",
"this",
".",
"comment",
"=",
"null",
";",
"return",
";",
... | Sets the optional comment string for the entry.
<p>ZIP entry comments have maximum length of 0xffff. If the length of the
specified comment string is greater than 0xFFFF bytes after encoding, only
the first 0xFFFF bytes are output to the ZIP file entry.
@param comment the comment string
@see #getComment() | [
"Sets",
"the",
"optional",
"comment",
"string",
"for",
"the",
"entry",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipEntry.java#L280-L294 |
33,490 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemExtensionDecl.java | ElemExtensionDecl.getFunction | public String getFunction(int i) throws ArrayIndexOutOfBoundsException
{
if (null == m_functions)
throw new ArrayIndexOutOfBoundsException();
return (String) m_functions.elementAt(i);
} | java | public String getFunction(int i) throws ArrayIndexOutOfBoundsException
{
if (null == m_functions)
throw new ArrayIndexOutOfBoundsException();
return (String) m_functions.elementAt(i);
} | [
"public",
"String",
"getFunction",
"(",
"int",
"i",
")",
"throws",
"ArrayIndexOutOfBoundsException",
"{",
"if",
"(",
"null",
"==",
"m_functions",
")",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
")",
";",
"return",
"(",
"String",
")",
"m_functions",
"... | Get a function at a given index in this extension element
@param i Index of function to get
@return Name of Function at given index
@throws ArrayIndexOutOfBoundsException | [
"Get",
"a",
"function",
"at",
"a",
"given",
"index",
"in",
"this",
"extension",
"element"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemExtensionDecl.java#L112-L119 |
33,491 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemExtensionDecl.java | ElemExtensionDecl.getElement | public String getElement(int i) throws ArrayIndexOutOfBoundsException
{
if (null == m_elements)
throw new ArrayIndexOutOfBoundsException();
return (String) m_elements.elementAt(i);
} | java | public String getElement(int i) throws ArrayIndexOutOfBoundsException
{
if (null == m_elements)
throw new ArrayIndexOutOfBoundsException();
return (String) m_elements.elementAt(i);
} | [
"public",
"String",
"getElement",
"(",
"int",
"i",
")",
"throws",
"ArrayIndexOutOfBoundsException",
"{",
"if",
"(",
"null",
"==",
"m_elements",
")",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
")",
";",
"return",
"(",
"String",
")",
"m_elements",
".",... | Get the element at the given index
@param i Index of element to get
@return The element at the given index
@throws ArrayIndexOutOfBoundsException | [
"Get",
"the",
"element",
"at",
"the",
"given",
"index"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemExtensionDecl.java#L168-L175 |
33,492 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalFormat.java | CompactDecimalFormat.getInstance | public static CompactDecimalFormat getInstance(Locale locale, CompactStyle style) {
return new CompactDecimalFormat(ULocale.forLocale(locale), style);
} | java | public static CompactDecimalFormat getInstance(Locale locale, CompactStyle style) {
return new CompactDecimalFormat(ULocale.forLocale(locale), style);
} | [
"public",
"static",
"CompactDecimalFormat",
"getInstance",
"(",
"Locale",
"locale",
",",
"CompactStyle",
"style",
")",
"{",
"return",
"new",
"CompactDecimalFormat",
"(",
"ULocale",
".",
"forLocale",
"(",
"locale",
")",
",",
"style",
")",
";",
"}"
] | Create a CompactDecimalFormat appropriate for a locale. The result may
be affected by the number system in the locale, such as ar-u-nu-latn.
@param locale the desired locale
@param style the compact style | [
"Create",
"a",
"CompactDecimalFormat",
"appropriate",
"for",
"a",
"locale",
".",
"The",
"result",
"may",
"be",
"affected",
"by",
"the",
"number",
"system",
"in",
"the",
"locale",
"such",
"as",
"ar",
"-",
"u",
"-",
"nu",
"-",
"latn",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalFormat.java#L112-L114 |
33,493 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalFormat.java | CompactDecimalFormat.getData | private Data getData(ULocale locale, CompactStyle style) {
CompactDecimalDataCache.DataBundle bundle = cache.get(locale);
switch (style) {
case SHORT:
return bundle.shortData;
case LONG:
return bundle.longData;
default:
return bundle.shortData;... | java | private Data getData(ULocale locale, CompactStyle style) {
CompactDecimalDataCache.DataBundle bundle = cache.get(locale);
switch (style) {
case SHORT:
return bundle.shortData;
case LONG:
return bundle.longData;
default:
return bundle.shortData;... | [
"private",
"Data",
"getData",
"(",
"ULocale",
"locale",
",",
"CompactStyle",
"style",
")",
"{",
"CompactDecimalDataCache",
".",
"DataBundle",
"bundle",
"=",
"cache",
".",
"get",
"(",
"locale",
")",
";",
"switch",
"(",
"style",
")",
"{",
"case",
"SHORT",
":... | Gets the data for a particular locale and style. If style is unrecognized,
we just return data for CompactStyle.SHORT.
@param locale The locale.
@param style The style.
@return The data which must not be modified. | [
"Gets",
"the",
"data",
"for",
"a",
"particular",
"locale",
"and",
"style",
".",
"If",
"style",
"is",
"unrecognized",
"we",
"just",
"return",
"data",
"for",
"CompactStyle",
".",
"SHORT",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalFormat.java#L523-L533 |
33,494 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalFormat.java | CompactDecimalFormat.getCurrencyData | private Data getCurrencyData(ULocale locale) {
CompactDecimalDataCache.DataBundle bundle = cache.get(locale);
return bundle.shortCurrencyData;
} | java | private Data getCurrencyData(ULocale locale) {
CompactDecimalDataCache.DataBundle bundle = cache.get(locale);
return bundle.shortCurrencyData;
} | [
"private",
"Data",
"getCurrencyData",
"(",
"ULocale",
"locale",
")",
"{",
"CompactDecimalDataCache",
".",
"DataBundle",
"bundle",
"=",
"cache",
".",
"get",
"(",
"locale",
")",
";",
"return",
"bundle",
".",
"shortCurrencyData",
";",
"}"
] | Gets the currency data for a particular locale.
Currently only short currency format is supported, since that is
the only form in CLDR.
@param locale The locale.
@return The data which must not be modified. | [
"Gets",
"the",
"currency",
"data",
"for",
"a",
"particular",
"locale",
".",
"Currently",
"only",
"short",
"currency",
"format",
"is",
"supported",
"since",
"that",
"is",
"the",
"only",
"form",
"in",
"CLDR",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CompactDecimalFormat.java#L541-L544 |
33,495 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XNodeSet.java | XNodeSet.getNumberFromNode | public double getNumberFromNode(int n)
{
XMLString xstr = m_dtmMgr.getDTM(n).getStringValue(n);
return xstr.toDouble();
} | java | public double getNumberFromNode(int n)
{
XMLString xstr = m_dtmMgr.getDTM(n).getStringValue(n);
return xstr.toDouble();
} | [
"public",
"double",
"getNumberFromNode",
"(",
"int",
"n",
")",
"{",
"XMLString",
"xstr",
"=",
"m_dtmMgr",
".",
"getDTM",
"(",
"n",
")",
".",
"getStringValue",
"(",
"n",
")",
";",
"return",
"xstr",
".",
"toDouble",
"(",
")",
";",
"}"
] | Get numeric value of the string conversion from a single node.
@param n Node to convert
@return numeric value of the string conversion from a single node. | [
"Get",
"numeric",
"value",
"of",
"the",
"string",
"conversion",
"from",
"a",
"single",
"node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XNodeSet.java#L148-L152 |
33,496 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XNodeSet.java | XNodeSet.numWithSideEffects | public double numWithSideEffects()
{
int node = nextNode();
return (node != DTM.NULL) ? getNumberFromNode(node) : Double.NaN;
} | java | public double numWithSideEffects()
{
int node = nextNode();
return (node != DTM.NULL) ? getNumberFromNode(node) : Double.NaN;
} | [
"public",
"double",
"numWithSideEffects",
"(",
")",
"{",
"int",
"node",
"=",
"nextNode",
"(",
")",
";",
"return",
"(",
"node",
"!=",
"DTM",
".",
"NULL",
")",
"?",
"getNumberFromNode",
"(",
"node",
")",
":",
"Double",
".",
"NaN",
";",
"}"
] | Cast result object to a number, but allow side effects, such as the
incrementing of an iterator.
@return numeric value of the string conversion from the
next node in the NodeSetDTM, or NAN if no node was found | [
"Cast",
"result",
"object",
"to",
"a",
"number",
"but",
"allow",
"side",
"effects",
"such",
"as",
"the",
"incrementing",
"of",
"an",
"iterator",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XNodeSet.java#L174-L179 |
33,497 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XNodeSet.java | XNodeSet.getStringFromNode | public XMLString getStringFromNode(int n)
{
// %OPT%
// I guess we'll have to get a static instance of the DTM manager...
if(DTM.NULL != n)
{
return m_dtmMgr.getDTM(n).getStringValue(n);
}
else
{
return org.apache.xpath.objects.XString.EMPTYSTRING;
}
} | java | public XMLString getStringFromNode(int n)
{
// %OPT%
// I guess we'll have to get a static instance of the DTM manager...
if(DTM.NULL != n)
{
return m_dtmMgr.getDTM(n).getStringValue(n);
}
else
{
return org.apache.xpath.objects.XString.EMPTYSTRING;
}
} | [
"public",
"XMLString",
"getStringFromNode",
"(",
"int",
"n",
")",
"{",
"// %OPT%",
"// I guess we'll have to get a static instance of the DTM manager...",
"if",
"(",
"DTM",
".",
"NULL",
"!=",
"n",
")",
"{",
"return",
"m_dtmMgr",
".",
"getDTM",
"(",
"n",
")",
".",
... | Get the string conversion from a single node.
@param n Node to convert
@return the string conversion from a single node. | [
"Get",
"the",
"string",
"conversion",
"from",
"a",
"single",
"node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XNodeSet.java#L211-L223 |
33,498 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XNodeSet.java | XNodeSet.getFresh | public XObject getFresh()
{
try
{
if(hasCache())
return (XObject)cloneWithReset();
else
return this; // don't bother to clone... won't do any good!
}
catch (CloneNotSupportedException cnse)
{
throw new RuntimeException(cnse.getMessage());
}
} | java | public XObject getFresh()
{
try
{
if(hasCache())
return (XObject)cloneWithReset();
else
return this; // don't bother to clone... won't do any good!
}
catch (CloneNotSupportedException cnse)
{
throw new RuntimeException(cnse.getMessage());
}
} | [
"public",
"XObject",
"getFresh",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"hasCache",
"(",
")",
")",
"return",
"(",
"XObject",
")",
"cloneWithReset",
"(",
")",
";",
"else",
"return",
"this",
";",
"// don't bother to clone... won't do any good!",
"}",
"catch",
"... | Get a fresh copy of the object. For use with variables.
@return A fresh nodelist. | [
"Get",
"a",
"fresh",
"copy",
"of",
"the",
"object",
".",
"For",
"use",
"with",
"variables",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XNodeSet.java#L405-L418 |
33,499 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XNodeSet.java | XNodeSet.mutableNodeset | public NodeSetDTM mutableNodeset()
{
NodeSetDTM mnl;
if(m_obj instanceof NodeSetDTM)
{
mnl = (NodeSetDTM) m_obj;
}
else
{
mnl = new NodeSetDTM(iter());
setObject(mnl);
setCurrentPos(0);
}
return mnl;
} | java | public NodeSetDTM mutableNodeset()
{
NodeSetDTM mnl;
if(m_obj instanceof NodeSetDTM)
{
mnl = (NodeSetDTM) m_obj;
}
else
{
mnl = new NodeSetDTM(iter());
setObject(mnl);
setCurrentPos(0);
}
return mnl;
} | [
"public",
"NodeSetDTM",
"mutableNodeset",
"(",
")",
"{",
"NodeSetDTM",
"mnl",
";",
"if",
"(",
"m_obj",
"instanceof",
"NodeSetDTM",
")",
"{",
"mnl",
"=",
"(",
"NodeSetDTM",
")",
"m_obj",
";",
"}",
"else",
"{",
"mnl",
"=",
"new",
"NodeSetDTM",
"(",
"iter",... | Cast result object to a mutableNodeset.
@return The nodeset as a mutableNodeset | [
"Cast",
"result",
"object",
"to",
"a",
"mutableNodeset",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XNodeSet.java#L425-L441 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.