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 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/AccountingChronology.java | AccountingChronology.localDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<AccountingDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<AccountingDate>) super.localDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<AccountingDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<AccountingDate>) super.localDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoLocalDateTime",
"<",
"AccountingDate",
">",
"localDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoLocalDateTime",
"<",
"AccountingDate",
">",
")",
"... | Obtains a Accounting local date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Accounting local date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Accounting",
"local",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/AccountingChronology.java#L426-L430 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/AccountingChronology.java | AccountingChronology.zonedDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<AccountingDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<AccountingDate>) super.zonedDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<AccountingDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<AccountingDate>) super.zonedDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoZonedDateTime",
"<",
"AccountingDate",
">",
"zonedDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoZonedDateTime",
"<",
"AccountingDate",
">",
")",
"... | Obtains a Accounting zoned date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Accounting zoned date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Accounting",
"zoned",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/AccountingChronology.java#L439-L443 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/CopticChronology.java | CopticChronology.date | @Override
public CopticDate date(int prolepticYear, int month, int dayOfMonth) {
return CopticDate.of(prolepticYear, month, dayOfMonth);
} | java | @Override
public CopticDate date(int prolepticYear, int month, int dayOfMonth) {
return CopticDate.of(prolepticYear, month, dayOfMonth);
} | [
"@",
"Override",
"public",
"CopticDate",
"date",
"(",
"int",
"prolepticYear",
",",
"int",
"month",
",",
"int",
"dayOfMonth",
")",
"{",
"return",
"CopticDate",
".",
"of",
"(",
"prolepticYear",
",",
"month",
",",
"dayOfMonth",
")",
";",
"}"
] | Obtains a local date in Coptic calendar system from the
proleptic-year, month-of-year and day-of-month fields.
@param prolepticYear the proleptic-year
@param month the month-of-year
@param dayOfMonth the day-of-month
@return the Coptic local date, not null
@throws DateTimeException if unable to create the date | [
"Obtains",
"a",
"local",
"date",
"in",
"Coptic",
"calendar",
"system",
"from",
"the",
"proleptic",
"-",
"year",
"month",
"-",
"of",
"-",
"year",
"and",
"day",
"-",
"of",
"-",
"month",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/CopticChronology.java#L167-L170 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/CopticChronology.java | CopticChronology.dateYearDay | @Override
public CopticDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | java | @Override
public CopticDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"@",
"Override",
"public",
"CopticDate",
"dateYearDay",
"(",
"Era",
"era",
",",
"int",
"yearOfEra",
",",
"int",
"dayOfYear",
")",
"{",
"return",
"dateYearDay",
"(",
"prolepticYear",
"(",
"era",
",",
"yearOfEra",
")",
",",
"dayOfYear",
")",
";",
"}"
] | Obtains a local date in Coptic calendar system from the
era, year-of-era and day-of-year fields.
@param era the Coptic era, not null
@param yearOfEra the year-of-era
@param dayOfYear the day-of-year
@return the Coptic local date, not null
@throws DateTimeException if unable to create the date
@throws ClassCastExcep... | [
"Obtains",
"a",
"local",
"date",
"in",
"Coptic",
"calendar",
"system",
"from",
"the",
"era",
"year",
"-",
"of",
"-",
"era",
"and",
"day",
"-",
"of",
"-",
"year",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/CopticChronology.java#L183-L186 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/CopticChronology.java | CopticChronology.localDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<CopticDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<CopticDate>) super.localDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<CopticDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<CopticDate>) super.localDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoLocalDateTime",
"<",
"CopticDate",
">",
"localDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoLocalDateTime",
"<",
"CopticDate",
">",
")",
"super",
... | Obtains a Coptic local date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Coptic local date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Coptic",
"local",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/CopticChronology.java#L286-L290 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/CopticChronology.java | CopticChronology.zonedDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<CopticDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<CopticDate>) super.zonedDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<CopticDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<CopticDate>) super.zonedDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoZonedDateTime",
"<",
"CopticDate",
">",
"zonedDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoZonedDateTime",
"<",
"CopticDate",
">",
")",
"super",
... | Obtains a Coptic zoned date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Coptic zoned date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Coptic",
"zoned",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/CopticChronology.java#L299-L303 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/YearQuarter.java | YearQuarter.with | private YearQuarter with(int newYear, Quarter newQuarter) {
if (year == newYear && quarter == newQuarter) {
return this;
}
return new YearQuarter(newYear, newQuarter);
} | java | private YearQuarter with(int newYear, Quarter newQuarter) {
if (year == newYear && quarter == newQuarter) {
return this;
}
return new YearQuarter(newYear, newQuarter);
} | [
"private",
"YearQuarter",
"with",
"(",
"int",
"newYear",
",",
"Quarter",
"newQuarter",
")",
"{",
"if",
"(",
"year",
"==",
"newYear",
"&&",
"quarter",
"==",
"newQuarter",
")",
"{",
"return",
"this",
";",
"}",
"return",
"new",
"YearQuarter",
"(",
"newYear",
... | Returns a copy of this year-quarter with the new year and quarter, checking
to see if a new object is in fact required.
@param newYear the year to represent, validated from MIN_YEAR to MAX_YEAR
@param newQuarter the quarter-of-year to represent, validated not null
@return the year-quarter, not null | [
"Returns",
"a",
"copy",
"of",
"this",
"year",
"-",
"quarter",
"with",
"the",
"new",
"year",
"and",
"quarter",
"checking",
"to",
"see",
"if",
"a",
"new",
"object",
"is",
"in",
"fact",
"required",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/YearQuarter.java#L308-L313 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/BritishCutoverChronology.java | BritishCutoverChronology.localDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<BritishCutoverDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<BritishCutoverDate>) super.localDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<BritishCutoverDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<BritishCutoverDate>) super.localDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoLocalDateTime",
"<",
"BritishCutoverDate",
">",
"localDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoLocalDateTime",
"<",
"BritishCutoverDate",
">",
... | Obtains a British Cutover local date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the British Cutover local date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"British",
"Cutover",
"local",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/BritishCutoverChronology.java#L370-L374 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/BritishCutoverChronology.java | BritishCutoverChronology.zonedDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<BritishCutoverDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<BritishCutoverDate>) super.zonedDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<BritishCutoverDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<BritishCutoverDate>) super.zonedDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoZonedDateTime",
"<",
"BritishCutoverDate",
">",
"zonedDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoZonedDateTime",
"<",
"BritishCutoverDate",
">",
... | Obtains a British Cutover zoned date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the British Cutover zoned date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"British",
"Cutover",
"zoned",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/BritishCutoverChronology.java#L383-L387 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/YearWeek.java | YearWeek.weekRange | private static int weekRange(int weekBasedYear) {
LocalDate date = LocalDate.of(weekBasedYear, 1, 1);
// 53 weeks if year starts on Thursday, or Wed in a leap year
if (date.getDayOfWeek() == THURSDAY || (date.getDayOfWeek() == WEDNESDAY && date.isLeapYear())) {
return 53;
}
... | java | private static int weekRange(int weekBasedYear) {
LocalDate date = LocalDate.of(weekBasedYear, 1, 1);
// 53 weeks if year starts on Thursday, or Wed in a leap year
if (date.getDayOfWeek() == THURSDAY || (date.getDayOfWeek() == WEDNESDAY && date.isLeapYear())) {
return 53;
}
... | [
"private",
"static",
"int",
"weekRange",
"(",
"int",
"weekBasedYear",
")",
"{",
"LocalDate",
"date",
"=",
"LocalDate",
".",
"of",
"(",
"weekBasedYear",
",",
"1",
",",
"1",
")",
";",
"// 53 weeks if year starts on Thursday, or Wed in a leap year",
"if",
"(",
"date"... | from IsoFields in ThreeTen-Backport | [
"from",
"IsoFields",
"in",
"ThreeTen",
"-",
"Backport"
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/YearWeek.java#L193-L200 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/YearWeek.java | YearWeek.with | private YearWeek with(int newYear, int newWeek) {
if (year == newYear && week == newWeek) {
return this;
}
return of(newYear, newWeek);
} | java | private YearWeek with(int newYear, int newWeek) {
if (year == newYear && week == newWeek) {
return this;
}
return of(newYear, newWeek);
} | [
"private",
"YearWeek",
"with",
"(",
"int",
"newYear",
",",
"int",
"newWeek",
")",
"{",
"if",
"(",
"year",
"==",
"newYear",
"&&",
"week",
"==",
"newWeek",
")",
"{",
"return",
"this",
";",
"}",
"return",
"of",
"(",
"newYear",
",",
"newWeek",
")",
";",
... | Returns a copy of this year-week with the new year and week, checking
to see if a new object is in fact required.
@param newYear the year to represent, validated from MIN_YEAR to MAX_YEAR
@param newWeek the week to represent, validated from 1 to 53
@return the year-week, not null | [
"Returns",
"a",
"copy",
"of",
"this",
"year",
"-",
"week",
"with",
"the",
"new",
"year",
"and",
"week",
"checking",
"to",
"see",
"if",
"a",
"new",
"object",
"is",
"in",
"fact",
"required",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/YearWeek.java#L303-L308 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/scale/SystemUtcRules.java | SystemUtcRules.register | void register(long mjDay, int leapAdjustment) {
if (leapAdjustment != -1 && leapAdjustment != 1) {
throw new IllegalArgumentException("Leap adjustment must be -1 or 1");
}
Data data = dataRef.get();
int pos = Arrays.binarySearch(data.dates, mjDay);
int currentAdj = po... | java | void register(long mjDay, int leapAdjustment) {
if (leapAdjustment != -1 && leapAdjustment != 1) {
throw new IllegalArgumentException("Leap adjustment must be -1 or 1");
}
Data data = dataRef.get();
int pos = Arrays.binarySearch(data.dates, mjDay);
int currentAdj = po... | [
"void",
"register",
"(",
"long",
"mjDay",
",",
"int",
"leapAdjustment",
")",
"{",
"if",
"(",
"leapAdjustment",
"!=",
"-",
"1",
"&&",
"leapAdjustment",
"!=",
"1",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Leap adjustment must be -1 or 1\"",
")... | Adds a new leap second to these rules.
@param mjDay the Modified Julian Day that the leap second occurs at the end of
@param leapAdjustment the leap seconds to add/remove at the end of the day, either -1 or 1
@throws IllegalArgumentException if the leap adjustment is invalid
@throws IllegalArgumentException if the d... | [
"Adds",
"a",
"new",
"leap",
"second",
"to",
"these",
"rules",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/scale/SystemUtcRules.java#L136-L160 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/scale/SystemUtcRules.java | SystemUtcRules.loadLeapSeconds | private static Data loadLeapSeconds() {
Data bestData = null;
URL url = null;
try {
// this is the new location of the file, working on Java 8, Java 9 class path and Java 9 module path
Enumeration<URL> en = Thread.currentThread().getContextClassLoader().getResources("META... | java | private static Data loadLeapSeconds() {
Data bestData = null;
URL url = null;
try {
// this is the new location of the file, working on Java 8, Java 9 class path and Java 9 module path
Enumeration<URL> en = Thread.currentThread().getContextClassLoader().getResources("META... | [
"private",
"static",
"Data",
"loadLeapSeconds",
"(",
")",
"{",
"Data",
"bestData",
"=",
"null",
";",
"URL",
"url",
"=",
"null",
";",
"try",
"{",
"// this is the new location of the file, working on Java 8, Java 9 class path and Java 9 module path",
"Enumeration",
"<",
"UR... | Loads the rules from files in the class loader, often jar files.
@return the list of loaded rules, not null
@throws Exception if an error occurs | [
"Loads",
"the",
"rules",
"from",
"files",
"in",
"the",
"class",
"loader",
"often",
"jar",
"files",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/scale/SystemUtcRules.java#L216-L255 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/scale/SystemUtcRules.java | SystemUtcRules.loadLeapSeconds | private static Data loadLeapSeconds(URL url) throws ClassNotFoundException, IOException {
List<String> lines;
try (BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), StandardCharsets.UTF_8))) {
lines = reader.lines().collect(Collectors.toList());
}
... | java | private static Data loadLeapSeconds(URL url) throws ClassNotFoundException, IOException {
List<String> lines;
try (BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), StandardCharsets.UTF_8))) {
lines = reader.lines().collect(Collectors.toList());
}
... | [
"private",
"static",
"Data",
"loadLeapSeconds",
"(",
"URL",
"url",
")",
"throws",
"ClassNotFoundException",
",",
"IOException",
"{",
"List",
"<",
"String",
">",
"lines",
";",
"try",
"(",
"BufferedReader",
"reader",
"=",
"new",
"BufferedReader",
"(",
"new",
"In... | Loads the leap second rules from a URL, often in a jar file.
@param url the jar file to load, not null
@throws Exception if an error occurs | [
"Loads",
"the",
"leap",
"second",
"rules",
"from",
"a",
"URL",
"often",
"in",
"a",
"jar",
"file",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/scale/SystemUtcRules.java#L263-L291 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/InternationalFixedDate.java | InternationalFixedDate.create | static InternationalFixedDate create(int prolepticYear, int month, int dayOfMonth) {
YEAR_RANGE.checkValidValue(prolepticYear, ChronoField.YEAR_OF_ERA);
MONTH_OF_YEAR_RANGE.checkValidValue(month, ChronoField.MONTH_OF_YEAR);
DAY_OF_MONTH_RANGE.checkValidValue(dayOfMonth, ChronoField.DAY_OF_MONTH)... | java | static InternationalFixedDate create(int prolepticYear, int month, int dayOfMonth) {
YEAR_RANGE.checkValidValue(prolepticYear, ChronoField.YEAR_OF_ERA);
MONTH_OF_YEAR_RANGE.checkValidValue(month, ChronoField.MONTH_OF_YEAR);
DAY_OF_MONTH_RANGE.checkValidValue(dayOfMonth, ChronoField.DAY_OF_MONTH)... | [
"static",
"InternationalFixedDate",
"create",
"(",
"int",
"prolepticYear",
",",
"int",
"month",
",",
"int",
"dayOfMonth",
")",
"{",
"YEAR_RANGE",
".",
"checkValidValue",
"(",
"prolepticYear",
",",
"ChronoField",
".",
"YEAR_OF_ERA",
")",
";",
"MONTH_OF_YEAR_RANGE",
... | Factory method, validates the given triplet year, month and dayOfMonth.
@param prolepticYear the International fixed proleptic-year
@param month the International fixed month, from 1 to 13
@param dayOfMonth the International fixed day-of-month, from 1 to 28 (29 for Leap Day or Year Day)
@return the International fi... | [
"Factory",
"method",
"validates",
"the",
"given",
"triplet",
"year",
"month",
"and",
"dayOfMonth",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/InternationalFixedDate.java#L335-L347 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/JulianChronology.java | JulianChronology.date | @Override
public JulianDate date(int prolepticYear, int month, int dayOfMonth) {
return JulianDate.of(prolepticYear, month, dayOfMonth);
} | java | @Override
public JulianDate date(int prolepticYear, int month, int dayOfMonth) {
return JulianDate.of(prolepticYear, month, dayOfMonth);
} | [
"@",
"Override",
"public",
"JulianDate",
"date",
"(",
"int",
"prolepticYear",
",",
"int",
"month",
",",
"int",
"dayOfMonth",
")",
"{",
"return",
"JulianDate",
".",
"of",
"(",
"prolepticYear",
",",
"month",
",",
"dayOfMonth",
")",
";",
"}"
] | Obtains a local date in Julian calendar system from the
proleptic-year, month-of-year and day-of-month fields.
@param prolepticYear the proleptic-year
@param month the month-of-year
@param dayOfMonth the day-of-month
@return the Julian local date, not null
@throws DateTimeException if unable to create the date | [
"Obtains",
"a",
"local",
"date",
"in",
"Julian",
"calendar",
"system",
"from",
"the",
"proleptic",
"-",
"year",
"month",
"-",
"of",
"-",
"year",
"and",
"day",
"-",
"of",
"-",
"month",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/JulianChronology.java#L185-L188 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/JulianChronology.java | JulianChronology.dateYearDay | @Override
public JulianDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | java | @Override
public JulianDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"@",
"Override",
"public",
"JulianDate",
"dateYearDay",
"(",
"Era",
"era",
",",
"int",
"yearOfEra",
",",
"int",
"dayOfYear",
")",
"{",
"return",
"dateYearDay",
"(",
"prolepticYear",
"(",
"era",
",",
"yearOfEra",
")",
",",
"dayOfYear",
")",
";",
"}"
] | Obtains a local date in Julian calendar system from the
era, year-of-era and day-of-year fields.
@param era the Julian era, not null
@param yearOfEra the year-of-era
@param dayOfYear the day-of-year
@return the Julian local date, not null
@throws DateTimeException if unable to create the date
@throws ClassCastExcep... | [
"Obtains",
"a",
"local",
"date",
"in",
"Julian",
"calendar",
"system",
"from",
"the",
"era",
"year",
"-",
"of",
"-",
"era",
"and",
"day",
"-",
"of",
"-",
"year",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/JulianChronology.java#L201-L204 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/JulianChronology.java | JulianChronology.localDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<JulianDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<JulianDate>) super.localDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<JulianDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<JulianDate>) super.localDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoLocalDateTime",
"<",
"JulianDate",
">",
"localDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoLocalDateTime",
"<",
"JulianDate",
">",
")",
"super",
... | Obtains a Julian local date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Julian local date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Julian",
"local",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/JulianChronology.java#L304-L308 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/JulianChronology.java | JulianChronology.zonedDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<JulianDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<JulianDate>) super.zonedDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<JulianDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<JulianDate>) super.zonedDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoZonedDateTime",
"<",
"JulianDate",
">",
"zonedDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoZonedDateTime",
"<",
"JulianDate",
">",
")",
"super",
... | Obtains a Julian zoned date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Julian zoned date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Julian",
"zoned",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/JulianChronology.java#L317-L321 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/Symmetry454Chronology.java | Symmetry454Chronology.date | @Override
public Symmetry454Date date(int prolepticYear, int month, int dayOfMonth) {
return Symmetry454Date.of(prolepticYear, month, dayOfMonth);
} | java | @Override
public Symmetry454Date date(int prolepticYear, int month, int dayOfMonth) {
return Symmetry454Date.of(prolepticYear, month, dayOfMonth);
} | [
"@",
"Override",
"public",
"Symmetry454Date",
"date",
"(",
"int",
"prolepticYear",
",",
"int",
"month",
",",
"int",
"dayOfMonth",
")",
"{",
"return",
"Symmetry454Date",
".",
"of",
"(",
"prolepticYear",
",",
"month",
",",
"dayOfMonth",
")",
";",
"}"
] | Obtains a local date in Symmetry454 calendar system from the
proleptic-year, month-of-year and day-of-month fields.
@param prolepticYear the proleptic-year
@param month the month-of-year
@param dayOfMonth the day-of-month
@return the Symmetry454 local date, not null
@throws DateTimeException if unable to create the... | [
"Obtains",
"a",
"local",
"date",
"in",
"Symmetry454",
"calendar",
"system",
"from",
"the",
"proleptic",
"-",
"year",
"month",
"-",
"of",
"-",
"year",
"and",
"day",
"-",
"of",
"-",
"month",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/Symmetry454Chronology.java#L264-L267 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/Symmetry454Chronology.java | Symmetry454Chronology.dateYearDay | @Override
public Symmetry454Date dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | java | @Override
public Symmetry454Date dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"@",
"Override",
"public",
"Symmetry454Date",
"dateYearDay",
"(",
"Era",
"era",
",",
"int",
"yearOfEra",
",",
"int",
"dayOfYear",
")",
"{",
"return",
"dateYearDay",
"(",
"prolepticYear",
"(",
"era",
",",
"yearOfEra",
")",
",",
"dayOfYear",
")",
";",
"}"
] | Obtains a local date in Symmetry454 calendar system from the
era, year-of-era and day-of-year fields.
@param era the Symmetry454 era, not null
@param yearOfEra the year-of-era
@param dayOfYear the day-of-year
@return the Symmetry454 local date, not null
@throws DateTimeException if unable to create the date
@throws... | [
"Obtains",
"a",
"local",
"date",
"in",
"Symmetry454",
"calendar",
"system",
"from",
"the",
"era",
"year",
"-",
"of",
"-",
"era",
"and",
"day",
"-",
"of",
"-",
"year",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/Symmetry454Chronology.java#L280-L283 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/Symmetry454Chronology.java | Symmetry454Chronology.localDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<Symmetry454Date> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<Symmetry454Date>) super.localDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<Symmetry454Date> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<Symmetry454Date>) super.localDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoLocalDateTime",
"<",
"Symmetry454Date",
">",
"localDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoLocalDateTime",
"<",
"Symmetry454Date",
">",
")",
... | Obtains a Symmetry454 local date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Symmetry454 local date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Symmetry454",
"local",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/Symmetry454Chronology.java#L383-L387 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/Symmetry454Chronology.java | Symmetry454Chronology.zonedDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<Symmetry454Date> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<Symmetry454Date>) super.zonedDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<Symmetry454Date> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<Symmetry454Date>) super.zonedDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoZonedDateTime",
"<",
"Symmetry454Date",
">",
"zonedDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoZonedDateTime",
"<",
"Symmetry454Date",
">",
")",
... | Obtains a Symmetry454 zoned date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Symmetry454 zoned date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Symmetry454",
"zoned",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/Symmetry454Chronology.java#L396-L400 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/Symmetry010Chronology.java | Symmetry010Chronology.date | @Override
public Symmetry010Date date(int prolepticYear, int month, int dayOfMonth) {
return Symmetry010Date.of(prolepticYear, month, dayOfMonth);
} | java | @Override
public Symmetry010Date date(int prolepticYear, int month, int dayOfMonth) {
return Symmetry010Date.of(prolepticYear, month, dayOfMonth);
} | [
"@",
"Override",
"public",
"Symmetry010Date",
"date",
"(",
"int",
"prolepticYear",
",",
"int",
"month",
",",
"int",
"dayOfMonth",
")",
"{",
"return",
"Symmetry010Date",
".",
"of",
"(",
"prolepticYear",
",",
"month",
",",
"dayOfMonth",
")",
";",
"}"
] | Obtains a local date in Symmetry010 calendar system from the
proleptic-year, month-of-year and day-of-month fields.
@param prolepticYear the proleptic-year
@param month the month-of-year
@param dayOfMonth the day-of-month
@return the Symmetry010 local date, not null
@throws DateTimeException if unable to create the... | [
"Obtains",
"a",
"local",
"date",
"in",
"Symmetry010",
"calendar",
"system",
"from",
"the",
"proleptic",
"-",
"year",
"month",
"-",
"of",
"-",
"year",
"and",
"day",
"-",
"of",
"-",
"month",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/Symmetry010Chronology.java#L271-L274 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/Symmetry010Chronology.java | Symmetry010Chronology.dateYearDay | @Override
public Symmetry010Date dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | java | @Override
public Symmetry010Date dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"@",
"Override",
"public",
"Symmetry010Date",
"dateYearDay",
"(",
"Era",
"era",
",",
"int",
"yearOfEra",
",",
"int",
"dayOfYear",
")",
"{",
"return",
"dateYearDay",
"(",
"prolepticYear",
"(",
"era",
",",
"yearOfEra",
")",
",",
"dayOfYear",
")",
";",
"}"
] | Obtains a local date in Symmetry010 calendar system from the
era, year-of-era and day-of-year fields.
@param era the Symmetry010 era, not null
@param yearOfEra the year-of-era
@param dayOfYear the day-of-year
@return the Symmetry010 local date, not null
@throws DateTimeException if unable to create the date
@throws... | [
"Obtains",
"a",
"local",
"date",
"in",
"Symmetry010",
"calendar",
"system",
"from",
"the",
"era",
"year",
"-",
"of",
"-",
"era",
"and",
"day",
"-",
"of",
"-",
"year",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/Symmetry010Chronology.java#L287-L290 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/Symmetry010Chronology.java | Symmetry010Chronology.localDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<Symmetry010Date> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<Symmetry010Date>) super.localDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<Symmetry010Date> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<Symmetry010Date>) super.localDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoLocalDateTime",
"<",
"Symmetry010Date",
">",
"localDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoLocalDateTime",
"<",
"Symmetry010Date",
">",
")",
... | Obtains a Symmetry010 local date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Symmetry010 local date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Symmetry010",
"local",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/Symmetry010Chronology.java#L390-L394 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/Symmetry010Chronology.java | Symmetry010Chronology.zonedDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<Symmetry010Date> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<Symmetry010Date>) super.zonedDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<Symmetry010Date> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<Symmetry010Date>) super.zonedDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoZonedDateTime",
"<",
"Symmetry010Date",
">",
"zonedDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoZonedDateTime",
"<",
"Symmetry010Date",
">",
")",
... | Obtains a Symmetry010 zoned date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Symmetry010 zoned date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Symmetry010",
"zoned",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/Symmetry010Chronology.java#L403-L407 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/PaxChronology.java | PaxChronology.date | @Override
public PaxDate date(int prolepticYear, int month, int dayOfMonth) {
return PaxDate.of(prolepticYear, month, dayOfMonth);
} | java | @Override
public PaxDate date(int prolepticYear, int month, int dayOfMonth) {
return PaxDate.of(prolepticYear, month, dayOfMonth);
} | [
"@",
"Override",
"public",
"PaxDate",
"date",
"(",
"int",
"prolepticYear",
",",
"int",
"month",
",",
"int",
"dayOfMonth",
")",
"{",
"return",
"PaxDate",
".",
"of",
"(",
"prolepticYear",
",",
"month",
",",
"dayOfMonth",
")",
";",
"}"
] | Obtains a local date in Pax calendar system from the
proleptic-year, month-of-year and day-of-month fields.
@param prolepticYear the proleptic-year
@param month the month-of-year
@param dayOfMonth the day-of-month
@return the Pax local date, not null
@throws DateTimeException if unable to create the date | [
"Obtains",
"a",
"local",
"date",
"in",
"Pax",
"calendar",
"system",
"from",
"the",
"proleptic",
"-",
"year",
"month",
"-",
"of",
"-",
"year",
"and",
"day",
"-",
"of",
"-",
"month",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/PaxChronology.java#L221-L224 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/PaxChronology.java | PaxChronology.dateYearDay | @Override
public PaxDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | java | @Override
public PaxDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"@",
"Override",
"public",
"PaxDate",
"dateYearDay",
"(",
"Era",
"era",
",",
"int",
"yearOfEra",
",",
"int",
"dayOfYear",
")",
"{",
"return",
"dateYearDay",
"(",
"prolepticYear",
"(",
"era",
",",
"yearOfEra",
")",
",",
"dayOfYear",
")",
";",
"}"
] | Obtains a local date in Pax calendar system from the
era, year-of-era and day-of-year fields.
@param era the Pax era, not null
@param yearOfEra the year-of-era
@param dayOfYear the day-of-year
@return the Pax local date, not null
@throws DateTimeException if unable to create the date
@throws ClassCastException if t... | [
"Obtains",
"a",
"local",
"date",
"in",
"Pax",
"calendar",
"system",
"from",
"the",
"era",
"year",
"-",
"of",
"-",
"era",
"and",
"day",
"-",
"of",
"-",
"year",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/PaxChronology.java#L237-L240 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/PaxChronology.java | PaxChronology.localDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<PaxDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<PaxDate>) super.localDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<PaxDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<PaxDate>) super.localDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoLocalDateTime",
"<",
"PaxDate",
">",
"localDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoLocalDateTime",
"<",
"PaxDate",
">",
")",
"super",
".",... | Obtains a Pax local date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Pax local date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Pax",
"local",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/PaxChronology.java#L340-L344 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/PaxChronology.java | PaxChronology.zonedDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<PaxDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<PaxDate>) super.zonedDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<PaxDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<PaxDate>) super.zonedDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoZonedDateTime",
"<",
"PaxDate",
">",
"zonedDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoZonedDateTime",
"<",
"PaxDate",
">",
")",
"super",
".",... | Obtains a Pax zoned date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Pax zoned date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Pax",
"zoned",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/PaxChronology.java#L353-L357 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/EthiopicChronology.java | EthiopicChronology.date | @Override
public EthiopicDate date(Era era, int yearOfEra, int month, int dayOfMonth) {
return date(prolepticYear(era, yearOfEra), month, dayOfMonth);
} | java | @Override
public EthiopicDate date(Era era, int yearOfEra, int month, int dayOfMonth) {
return date(prolepticYear(era, yearOfEra), month, dayOfMonth);
} | [
"@",
"Override",
"public",
"EthiopicDate",
"date",
"(",
"Era",
"era",
",",
"int",
"yearOfEra",
",",
"int",
"month",
",",
"int",
"dayOfMonth",
")",
"{",
"return",
"date",
"(",
"prolepticYear",
"(",
"era",
",",
"yearOfEra",
")",
",",
"month",
",",
"dayOfMo... | Obtains a local date in Ethiopic calendar system from the
era, year-of-era, month-of-year and day-of-month fields.
@param era the Ethiopic era, not null
@param yearOfEra the year-of-era
@param month the month-of-year
@param dayOfMonth the day-of-month
@return the Ethiopic local date, not null
@throws DateTimeExcep... | [
"Obtains",
"a",
"local",
"date",
"in",
"Ethiopic",
"calendar",
"system",
"from",
"the",
"era",
"year",
"-",
"of",
"-",
"era",
"month",
"-",
"of",
"-",
"year",
"and",
"day",
"-",
"of",
"-",
"month",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/EthiopicChronology.java#L152-L155 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/EthiopicChronology.java | EthiopicChronology.date | @Override
public EthiopicDate date(int prolepticYear, int month, int dayOfMonth) {
return EthiopicDate.of(prolepticYear, month, dayOfMonth);
} | java | @Override
public EthiopicDate date(int prolepticYear, int month, int dayOfMonth) {
return EthiopicDate.of(prolepticYear, month, dayOfMonth);
} | [
"@",
"Override",
"public",
"EthiopicDate",
"date",
"(",
"int",
"prolepticYear",
",",
"int",
"month",
",",
"int",
"dayOfMonth",
")",
"{",
"return",
"EthiopicDate",
".",
"of",
"(",
"prolepticYear",
",",
"month",
",",
"dayOfMonth",
")",
";",
"}"
] | Obtains a local date in Ethiopic calendar system from the
proleptic-year, month-of-year and day-of-month fields.
@param prolepticYear the proleptic-year
@param month the month-of-year
@param dayOfMonth the day-of-month
@return the Ethiopic local date, not null
@throws DateTimeException if unable to create the date | [
"Obtains",
"a",
"local",
"date",
"in",
"Ethiopic",
"calendar",
"system",
"from",
"the",
"proleptic",
"-",
"year",
"month",
"-",
"of",
"-",
"year",
"and",
"day",
"-",
"of",
"-",
"month",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/EthiopicChronology.java#L167-L170 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/EthiopicChronology.java | EthiopicChronology.dateYearDay | @Override
public EthiopicDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | java | @Override
public EthiopicDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"@",
"Override",
"public",
"EthiopicDate",
"dateYearDay",
"(",
"Era",
"era",
",",
"int",
"yearOfEra",
",",
"int",
"dayOfYear",
")",
"{",
"return",
"dateYearDay",
"(",
"prolepticYear",
"(",
"era",
",",
"yearOfEra",
")",
",",
"dayOfYear",
")",
";",
"}"
] | Obtains a local date in Ethiopic calendar system from the
era, year-of-era and day-of-year fields.
@param era the Ethiopic era, not null
@param yearOfEra the year-of-era
@param dayOfYear the day-of-year
@return the Ethiopic local date, not null
@throws DateTimeException if unable to create the date
@throws ClassCas... | [
"Obtains",
"a",
"local",
"date",
"in",
"Ethiopic",
"calendar",
"system",
"from",
"the",
"era",
"year",
"-",
"of",
"-",
"era",
"and",
"day",
"-",
"of",
"-",
"year",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/EthiopicChronology.java#L183-L186 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/EthiopicChronology.java | EthiopicChronology.localDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<EthiopicDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<EthiopicDate>) super.localDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<EthiopicDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<EthiopicDate>) super.localDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoLocalDateTime",
"<",
"EthiopicDate",
">",
"localDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoLocalDateTime",
"<",
"EthiopicDate",
">",
")",
"supe... | Obtains a Ethiopic local date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Ethiopic local date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Ethiopic",
"local",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/EthiopicChronology.java#L286-L290 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/EthiopicChronology.java | EthiopicChronology.zonedDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<EthiopicDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<EthiopicDate>) super.zonedDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<EthiopicDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<EthiopicDate>) super.zonedDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoZonedDateTime",
"<",
"EthiopicDate",
">",
"zonedDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoZonedDateTime",
"<",
"EthiopicDate",
">",
")",
"supe... | Obtains a Ethiopic zoned date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Ethiopic zoned date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Ethiopic",
"zoned",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/EthiopicChronology.java#L299-L303 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/DiscordianChronology.java | DiscordianChronology.date | @Override
public DiscordianDate date(int prolepticYear, int month, int dayOfMonth) {
return DiscordianDate.of(prolepticYear, month, dayOfMonth);
} | java | @Override
public DiscordianDate date(int prolepticYear, int month, int dayOfMonth) {
return DiscordianDate.of(prolepticYear, month, dayOfMonth);
} | [
"@",
"Override",
"public",
"DiscordianDate",
"date",
"(",
"int",
"prolepticYear",
",",
"int",
"month",
",",
"int",
"dayOfMonth",
")",
"{",
"return",
"DiscordianDate",
".",
"of",
"(",
"prolepticYear",
",",
"month",
",",
"dayOfMonth",
")",
";",
"}"
] | Obtains a local date in Discordian calendar system from the
proleptic-year, month-of-year and day-of-month fields.
@param prolepticYear the proleptic-year
@param month the month-of-year
@param dayOfMonth the day-of-month
@return the Discordian local date, not null
@throws DateTimeException if unable to create the d... | [
"Obtains",
"a",
"local",
"date",
"in",
"Discordian",
"calendar",
"system",
"from",
"the",
"proleptic",
"-",
"year",
"month",
"-",
"of",
"-",
"year",
"and",
"day",
"-",
"of",
"-",
"month",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/DiscordianChronology.java#L229-L232 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/DiscordianChronology.java | DiscordianChronology.dateYearDay | @Override
public DiscordianDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | java | @Override
public DiscordianDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"@",
"Override",
"public",
"DiscordianDate",
"dateYearDay",
"(",
"Era",
"era",
",",
"int",
"yearOfEra",
",",
"int",
"dayOfYear",
")",
"{",
"return",
"dateYearDay",
"(",
"prolepticYear",
"(",
"era",
",",
"yearOfEra",
")",
",",
"dayOfYear",
")",
";",
"}"
] | Obtains a local date in Discordian calendar system from the
era, year-of-era and day-of-year fields.
@param era the Discordian era, not null
@param yearOfEra the year-of-era
@param dayOfYear the day-of-year
@return the Discordian local date, not null
@throws DateTimeException if unable to create the date
@throws Cl... | [
"Obtains",
"a",
"local",
"date",
"in",
"Discordian",
"calendar",
"system",
"from",
"the",
"era",
"year",
"-",
"of",
"-",
"era",
"and",
"day",
"-",
"of",
"-",
"year",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/DiscordianChronology.java#L245-L248 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/DiscordianChronology.java | DiscordianChronology.localDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<DiscordianDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<DiscordianDate>) super.localDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<DiscordianDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<DiscordianDate>) super.localDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoLocalDateTime",
"<",
"DiscordianDate",
">",
"localDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoLocalDateTime",
"<",
"DiscordianDate",
">",
")",
"... | Obtains a Discordian local date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Discordian local date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Discordian",
"local",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/DiscordianChronology.java#L348-L352 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/DiscordianChronology.java | DiscordianChronology.zonedDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<DiscordianDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<DiscordianDate>) super.zonedDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<DiscordianDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<DiscordianDate>) super.zonedDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoZonedDateTime",
"<",
"DiscordianDate",
">",
"zonedDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoZonedDateTime",
"<",
"DiscordianDate",
">",
")",
"... | Obtains a Discordian zoned date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the Discordian zoned date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"Discordian",
"zoned",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/DiscordianChronology.java#L361-L365 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/InternationalFixedChronology.java | InternationalFixedChronology.date | @Override
public InternationalFixedDate date(int prolepticYear, int month, int dayOfMonth) {
return InternationalFixedDate.of(prolepticYear, month, dayOfMonth);
} | java | @Override
public InternationalFixedDate date(int prolepticYear, int month, int dayOfMonth) {
return InternationalFixedDate.of(prolepticYear, month, dayOfMonth);
} | [
"@",
"Override",
"public",
"InternationalFixedDate",
"date",
"(",
"int",
"prolepticYear",
",",
"int",
"month",
",",
"int",
"dayOfMonth",
")",
"{",
"return",
"InternationalFixedDate",
".",
"of",
"(",
"prolepticYear",
",",
"month",
",",
"dayOfMonth",
")",
";",
"... | Obtains a local date in International Fixed calendar system from the
proleptic-year, month-of-year and day-of-month fields.
@param prolepticYear the proleptic-year
@param month the month-of-year
@param dayOfMonth the day-of-month
@return the International Fixed local date, not null
@throws DateTimeException if unab... | [
"Obtains",
"a",
"local",
"date",
"in",
"International",
"Fixed",
"calendar",
"system",
"from",
"the",
"proleptic",
"-",
"year",
"month",
"-",
"of",
"-",
"year",
"and",
"day",
"-",
"of",
"-",
"month",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/InternationalFixedChronology.java#L239-L242 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/InternationalFixedChronology.java | InternationalFixedChronology.dateYearDay | @Override
public InternationalFixedDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | java | @Override
public InternationalFixedDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"@",
"Override",
"public",
"InternationalFixedDate",
"dateYearDay",
"(",
"Era",
"era",
",",
"int",
"yearOfEra",
",",
"int",
"dayOfYear",
")",
"{",
"return",
"dateYearDay",
"(",
"prolepticYear",
"(",
"era",
",",
"yearOfEra",
")",
",",
"dayOfYear",
")",
";",
"... | Obtains a local date in International Fixed calendar system from the
era, year-of-era and day-of-year fields.
@param era the International Fixed era, not null
@param yearOfEra the year-of-era
@param dayOfYear the day-of-year
@return the International Fixed local date, not null
@throws DateTimeException if unable to... | [
"Obtains",
"a",
"local",
"date",
"in",
"International",
"Fixed",
"calendar",
"system",
"from",
"the",
"era",
"year",
"-",
"of",
"-",
"era",
"and",
"day",
"-",
"of",
"-",
"year",
"fields",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/InternationalFixedChronology.java#L255-L258 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/InternationalFixedChronology.java | InternationalFixedChronology.localDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<InternationalFixedDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<InternationalFixedDate>) super.localDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoLocalDateTime<InternationalFixedDate> localDateTime(TemporalAccessor temporal) {
return (ChronoLocalDateTime<InternationalFixedDate>) super.localDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoLocalDateTime",
"<",
"InternationalFixedDate",
">",
"localDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoLocalDateTime",
"<",
"InternationalFixedDate",
... | Obtains a International Fixed local date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the International Fixed local date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"International",
"Fixed",
"local",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/InternationalFixedChronology.java#L358-L362 | train |
ThreeTen/threeten-extra | src/main/java/org/threeten/extra/chrono/InternationalFixedChronology.java | InternationalFixedChronology.zonedDateTime | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<InternationalFixedDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<InternationalFixedDate>) super.zonedDateTime(temporal);
} | java | @Override
@SuppressWarnings("unchecked")
public ChronoZonedDateTime<InternationalFixedDate> zonedDateTime(TemporalAccessor temporal) {
return (ChronoZonedDateTime<InternationalFixedDate>) super.zonedDateTime(temporal);
} | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"ChronoZonedDateTime",
"<",
"InternationalFixedDate",
">",
"zonedDateTime",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"return",
"(",
"ChronoZonedDateTime",
"<",
"InternationalFixedDate",
... | Obtains a International Fixed zoned date-time from another date-time object.
@param temporal the date-time object to convert, not null
@return the International Fixed zoned date-time, not null
@throws DateTimeException if unable to create the date-time | [
"Obtains",
"a",
"International",
"Fixed",
"zoned",
"date",
"-",
"time",
"from",
"another",
"date",
"-",
"time",
"object",
"."
] | e94ecd3592ef70e54d6eea21095239ea9ffbab78 | https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/InternationalFixedChronology.java#L371-L375 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/GoogleMap.java | GoogleMap.boundsProperty | public final ReadOnlyObjectProperty<LatLongBounds> boundsProperty() {
if (bounds == null) {
bounds = new ReadOnlyObjectWrapper<>(getBounds());
addStateEventHandler(MapStateEventType.idle, () -> {
bounds.set(getBounds());
});
}
return bounds.get... | java | public final ReadOnlyObjectProperty<LatLongBounds> boundsProperty() {
if (bounds == null) {
bounds = new ReadOnlyObjectWrapper<>(getBounds());
addStateEventHandler(MapStateEventType.idle, () -> {
bounds.set(getBounds());
});
}
return bounds.get... | [
"public",
"final",
"ReadOnlyObjectProperty",
"<",
"LatLongBounds",
">",
"boundsProperty",
"(",
")",
"{",
"if",
"(",
"bounds",
"==",
"null",
")",
"{",
"bounds",
"=",
"new",
"ReadOnlyObjectWrapper",
"<>",
"(",
"getBounds",
"(",
")",
")",
";",
"addStateEventHandl... | A property tied to the map, updated when the idle state event is fired.
@return | [
"A",
"property",
"tied",
"to",
"the",
"map",
"updated",
"when",
"the",
"idle",
"state",
"event",
"is",
"fired",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/GoogleMap.java#L179-L187 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/GoogleMap.java | GoogleMap.addMarker | public void addMarker(Marker marker) {
if (markers == null) {
markers = new HashSet<>();
}
markers.add(marker);
marker.setMap(this);
} | java | public void addMarker(Marker marker) {
if (markers == null) {
markers = new HashSet<>();
}
markers.add(marker);
marker.setMap(this);
} | [
"public",
"void",
"addMarker",
"(",
"Marker",
"marker",
")",
"{",
"if",
"(",
"markers",
"==",
"null",
")",
"{",
"markers",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"}",
"markers",
".",
"add",
"(",
"marker",
")",
";",
"marker",
".",
"setMap",
"("... | Adds the supplied marker to the map.
@param marker | [
"Adds",
"the",
"supplied",
"marker",
"to",
"the",
"map",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/GoogleMap.java#L202-L208 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/GoogleMap.java | GoogleMap.removeMarker | public void removeMarker(Marker marker) {
if (markers != null && markers.contains(marker)) {
markers.remove(marker);
}
marker.setMap(null);
} | java | public void removeMarker(Marker marker) {
if (markers != null && markers.contains(marker)) {
markers.remove(marker);
}
marker.setMap(null);
} | [
"public",
"void",
"removeMarker",
"(",
"Marker",
"marker",
")",
"{",
"if",
"(",
"markers",
"!=",
"null",
"&&",
"markers",
".",
"contains",
"(",
"marker",
")",
")",
"{",
"markers",
".",
"remove",
"(",
"marker",
")",
";",
"}",
"marker",
".",
"setMap",
... | Removes the supplied marker from the map.
@param marker | [
"Removes",
"the",
"supplied",
"marker",
"from",
"the",
"map",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/GoogleMap.java#L215-L220 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/GoogleMap.java | GoogleMap.clearMarkers | public void clearMarkers() {
if (markers != null && !markers.isEmpty()) {
markers.forEach((m) -> {
m.setMap(null);
});
markers.clear();
} | java | public void clearMarkers() {
if (markers != null && !markers.isEmpty()) {
markers.forEach((m) -> {
m.setMap(null);
});
markers.clear();
} | [
"public",
"void",
"clearMarkers",
"(",
")",
"{",
"if",
"(",
"markers",
"!=",
"null",
"&&",
"!",
"markers",
".",
"isEmpty",
"(",
")",
")",
"{",
"markers",
".",
"forEach",
"(",
"(",
"m",
")",
"-",
">",
"{",
"m",
".",
"setMap",
"(",
"null",
")",
"... | Removes all of the markers from the map. | [
"Removes",
"all",
"of",
"the",
"markers",
"from",
"the",
"map",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/GoogleMap.java#L226-L232 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java | JavascriptObject.setProperty | protected void setProperty(String propertyName, JavascriptObject propertyValue) {
jsObject.setMember(propertyName, propertyValue.getJSObject());
} | java | protected void setProperty(String propertyName, JavascriptObject propertyValue) {
jsObject.setMember(propertyName, propertyValue.getJSObject());
} | [
"protected",
"void",
"setProperty",
"(",
"String",
"propertyName",
",",
"JavascriptObject",
"propertyValue",
")",
"{",
"jsObject",
".",
"setMember",
"(",
"propertyName",
",",
"propertyValue",
".",
"getJSObject",
"(",
")",
")",
";",
"}"
] | Sets a property on this Javascript object for which the value is a
Javascript object itself.
@param propertyName The name of the property.
@param propertyValue The value of the property. | [
"Sets",
"a",
"property",
"on",
"this",
"Javascript",
"object",
"for",
"which",
"the",
"value",
"is",
"a",
"Javascript",
"object",
"itself",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java#L156-L158 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java | JavascriptObject.setProperty | protected void setProperty(String propertyName, JavascriptEnum propertyValue) {
jsObject.setMember(propertyName, propertyValue.getEnumValue());
} | java | protected void setProperty(String propertyName, JavascriptEnum propertyValue) {
jsObject.setMember(propertyName, propertyValue.getEnumValue());
} | [
"protected",
"void",
"setProperty",
"(",
"String",
"propertyName",
",",
"JavascriptEnum",
"propertyValue",
")",
"{",
"jsObject",
".",
"setMember",
"(",
"propertyName",
",",
"propertyValue",
".",
"getEnumValue",
"(",
")",
")",
";",
"}"
] | Sets a property on this Javascript object for which the value is a
JavascriptEnum
The value is set to what is returned by the getEnumValue() method on the JavascriptEnum
@param propertyName The name of the property.
@param propertyValue The value of the property. | [
"Sets",
"a",
"property",
"on",
"this",
"Javascript",
"object",
"for",
"which",
"the",
"value",
"is",
"a",
"JavascriptEnum"
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java#L169-L171 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java | JavascriptObject.getProperty | protected <T> T getProperty(String key, Class<T> type) {
Object returnValue = getProperty(key);
if (returnValue != null) {
return (T) returnValue;
} else {
return null;
}
} | java | protected <T> T getProperty(String key, Class<T> type) {
Object returnValue = getProperty(key);
if (returnValue != null) {
return (T) returnValue;
} else {
return null;
}
} | [
"protected",
"<",
"T",
">",
"T",
"getProperty",
"(",
"String",
"key",
",",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"Object",
"returnValue",
"=",
"getProperty",
"(",
"key",
")",
";",
"if",
"(",
"returnValue",
"!=",
"null",
")",
"{",
"return",
"(",
... | Gets the property and casts to the appropriate type
@param <T>
@param key The property name
@param type The property type
@return The value of the property | [
"Gets",
"the",
"property",
"and",
"casts",
"to",
"the",
"appropriate",
"type"
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java#L192-L199 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java | JavascriptObject.invokeJavascriptReturnValue | protected <T> T invokeJavascriptReturnValue(String function, Class<T> returnType) {
Object returnObject = invokeJavascript(function);
if (returnObject instanceof JSObject) {
try {
Constructor<T> constructor = returnType.getConstructor(JSObject.class);
return c... | java | protected <T> T invokeJavascriptReturnValue(String function, Class<T> returnType) {
Object returnObject = invokeJavascript(function);
if (returnObject instanceof JSObject) {
try {
Constructor<T> constructor = returnType.getConstructor(JSObject.class);
return c... | [
"protected",
"<",
"T",
">",
"T",
"invokeJavascriptReturnValue",
"(",
"String",
"function",
",",
"Class",
"<",
"T",
">",
"returnType",
")",
"{",
"Object",
"returnObject",
"=",
"invokeJavascript",
"(",
"function",
")",
";",
"if",
"(",
"returnObject",
"instanceof... | Invokes a JavaScript function that takes no arguments.
@param <T>
@param function The function to invoke
@param returnType The type of object to return
@return The result of the function. | [
"Invokes",
"a",
"JavaScript",
"function",
"that",
"takes",
"no",
"arguments",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java#L241-L253 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java | JavascriptObject.checkUndefined | protected Object checkUndefined(Object val) {
if (val instanceof String && ((String) val).equals("undefined")) {
return null;
}
return val;
} | java | protected Object checkUndefined(Object val) {
if (val instanceof String && ((String) val).equals("undefined")) {
return null;
}
return val;
} | [
"protected",
"Object",
"checkUndefined",
"(",
"Object",
"val",
")",
"{",
"if",
"(",
"val",
"instanceof",
"String",
"&&",
"(",
"(",
"String",
")",
"val",
")",
".",
"equals",
"(",
"\"undefined\"",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"val... | JSObject will return the String "undefined" at certain times, so we
need to make sure we're not getting a value that looks valid, but isn't.
@param val The value from Javascript to be checked.
@return Either null or the value passed in. | [
"JSObject",
"will",
"return",
"the",
"String",
"undefined",
"at",
"certain",
"times",
"so",
"we",
"need",
"to",
"make",
"sure",
"we",
"re",
"not",
"getting",
"a",
"value",
"that",
"looks",
"valid",
"but",
"isn",
"t",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java#L286-L291 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java | JavascriptObject.checkBoolean | protected Boolean checkBoolean(Object val, Boolean def) {
return (val == null) ? def : (Boolean) val;
} | java | protected Boolean checkBoolean(Object val, Boolean def) {
return (val == null) ? def : (Boolean) val;
} | [
"protected",
"Boolean",
"checkBoolean",
"(",
"Object",
"val",
",",
"Boolean",
"def",
")",
"{",
"return",
"(",
"val",
"==",
"null",
")",
"?",
"def",
":",
"(",
"Boolean",
")",
"val",
";",
"}"
] | Checks a returned Javascript value where we expect a boolean but could
get null.
@param val The value from Javascript to be checked.
@param def The default return value, which can be null.
@return The actual value, or if null, returns false. | [
"Checks",
"a",
"returned",
"Javascript",
"value",
"where",
"we",
"expect",
"a",
"boolean",
"but",
"could",
"get",
"null",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptObject.java#L300-L302 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/event/EventHandlers.java | EventHandlers.registerHandler | public String registerHandler(GFXEventHandler handler) {
String uuid = UUID.randomUUID().toString();
handlers.put(uuid, handler);
return uuid;
} | java | public String registerHandler(GFXEventHandler handler) {
String uuid = UUID.randomUUID().toString();
handlers.put(uuid, handler);
return uuid;
} | [
"public",
"String",
"registerHandler",
"(",
"GFXEventHandler",
"handler",
")",
"{",
"String",
"uuid",
"=",
"UUID",
".",
"randomUUID",
"(",
")",
".",
"toString",
"(",
")",
";",
"handlers",
".",
"put",
"(",
"uuid",
",",
"handler",
")",
";",
"return",
"uuid... | Registers a handler and returns the callback key to be passed to
Javascript.
@param handler Handler to be registered.
@return A String random UUID that can be used as the callback key. | [
"Registers",
"a",
"handler",
"and",
"returns",
"the",
"callback",
"key",
"to",
"be",
"passed",
"to",
"Javascript",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/event/EventHandlers.java#L79-L83 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/event/EventHandlers.java | EventHandlers.handleStateEvent | public void handleStateEvent(String callbackKey) {
if (handlers.containsKey(callbackKey) && handlers.get(callbackKey) instanceof StateEventHandler) {
((StateEventHandler) handlers.get(callbackKey)).handle();
} else {
System.err.println("Error in handle: " + callbackKey + " for st... | java | public void handleStateEvent(String callbackKey) {
if (handlers.containsKey(callbackKey) && handlers.get(callbackKey) instanceof StateEventHandler) {
((StateEventHandler) handlers.get(callbackKey)).handle();
} else {
System.err.println("Error in handle: " + callbackKey + " for st... | [
"public",
"void",
"handleStateEvent",
"(",
"String",
"callbackKey",
")",
"{",
"if",
"(",
"handlers",
".",
"containsKey",
"(",
"callbackKey",
")",
"&&",
"handlers",
".",
"get",
"(",
"callbackKey",
")",
"instanceof",
"StateEventHandler",
")",
"{",
"(",
"(",
"S... | This method is called from Javascript, passing in the previously created
callback key. It uses that to find the correct handler and then passes on
the call. State events in the Google Maps API don't pass any parameters.
@param callbackKey Key generated by the call to registerHandler. | [
"This",
"method",
"is",
"called",
"from",
"Javascript",
"passing",
"in",
"the",
"previously",
"created",
"callback",
"key",
".",
"It",
"uses",
"that",
"to",
"find",
"the",
"correct",
"handler",
"and",
"then",
"passes",
"on",
"the",
"call",
".",
"State",
"e... | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/event/EventHandlers.java#L113-L119 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/shapes/ArcBuilder.java | ArcBuilder.buildClosedArc | public static final PolygonOptions buildClosedArc(LatLong center, LatLong start, LatLong end, ArcType arcType) {
MVCArray res = buildArcPoints(center, start, end);
if (ArcType.ROUND.equals(arcType)) {
res.push(center);
}
return new PolygonOptions().paths(res);
} | java | public static final PolygonOptions buildClosedArc(LatLong center, LatLong start, LatLong end, ArcType arcType) {
MVCArray res = buildArcPoints(center, start, end);
if (ArcType.ROUND.equals(arcType)) {
res.push(center);
}
return new PolygonOptions().paths(res);
} | [
"public",
"static",
"final",
"PolygonOptions",
"buildClosedArc",
"(",
"LatLong",
"center",
",",
"LatLong",
"start",
",",
"LatLong",
"end",
",",
"ArcType",
"arcType",
")",
"{",
"MVCArray",
"res",
"=",
"buildArcPoints",
"(",
"center",
",",
"start",
",",
"end",
... | Builds the path for a closed arc, returning a PolygonOptions that can be
further customised before use.
@param center
@param start
@param end
@param arcType Pass in either ArcType.CHORD or ArcType.ROUND
@return PolygonOptions with the paths element populated. | [
"Builds",
"the",
"path",
"for",
"a",
"closed",
"arc",
"returning",
"a",
"PolygonOptions",
"that",
"can",
"be",
"further",
"customised",
"before",
"use",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/shapes/ArcBuilder.java#L34-L40 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/shapes/ArcBuilder.java | ArcBuilder.buildOpenArc | public static final PolylineOptions buildOpenArc(LatLong center, LatLong start, LatLong end) {
MVCArray res = buildArcPoints(center, start, end);
return new PolylineOptions().path(res);
} | java | public static final PolylineOptions buildOpenArc(LatLong center, LatLong start, LatLong end) {
MVCArray res = buildArcPoints(center, start, end);
return new PolylineOptions().path(res);
} | [
"public",
"static",
"final",
"PolylineOptions",
"buildOpenArc",
"(",
"LatLong",
"center",
",",
"LatLong",
"start",
",",
"LatLong",
"end",
")",
"{",
"MVCArray",
"res",
"=",
"buildArcPoints",
"(",
"center",
",",
"start",
",",
"end",
")",
";",
"return",
"new",
... | Builds the path for an open arc based on a PolylineOptions.
@param center
@param start
@param end
@return PolylineOptions with the paths element populated. | [
"Builds",
"the",
"path",
"for",
"an",
"open",
"arc",
"based",
"on",
"a",
"PolylineOptions",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/shapes/ArcBuilder.java#L50-L53 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/shapes/ArcBuilder.java | ArcBuilder.buildArcPoints | public static final MVCArray buildArcPoints(LatLong center, double startBearing, double endBearing, double radius) {
int points = DEFAULT_ARC_POINTS;
MVCArray res = new MVCArray();
if (startBearing > endBearing) {
endBearing += 360.0;
}
double deltaBearing = endBear... | java | public static final MVCArray buildArcPoints(LatLong center, double startBearing, double endBearing, double radius) {
int points = DEFAULT_ARC_POINTS;
MVCArray res = new MVCArray();
if (startBearing > endBearing) {
endBearing += 360.0;
}
double deltaBearing = endBear... | [
"public",
"static",
"final",
"MVCArray",
"buildArcPoints",
"(",
"LatLong",
"center",
",",
"double",
"startBearing",
",",
"double",
"endBearing",
",",
"double",
"radius",
")",
"{",
"int",
"points",
"=",
"DEFAULT_ARC_POINTS",
";",
"MVCArray",
"res",
"=",
"new",
... | Generates the points for an arc based on two bearings from a centre point
and a radius.
@param center The LatLong point of the center.
@param startBearing North is 0 degrees, East is 90 degrees, etc.
@param endBearing North is 0 degrees, East is 90 degrees, etc.
@param radius In metres
@return An array of LatLong poin... | [
"Generates",
"the",
"points",
"for",
"an",
"arc",
"based",
"on",
"two",
"bearings",
"from",
"a",
"centre",
"point",
"and",
"a",
"radius",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/shapes/ArcBuilder.java#L71-L87 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/service/elevation/ElevationResult.java | ElevationResult.getLocation | public LatLong getLocation() {
if (location == null) {
location = new LatLong((JSObject) (getJSObject().getMember("location")));
}
return location;
} | java | public LatLong getLocation() {
if (location == null) {
location = new LatLong((JSObject) (getJSObject().getMember("location")));
}
return location;
} | [
"public",
"LatLong",
"getLocation",
"(",
")",
"{",
"if",
"(",
"location",
"==",
"null",
")",
"{",
"location",
"=",
"new",
"LatLong",
"(",
"(",
"JSObject",
")",
"(",
"getJSObject",
"(",
")",
".",
"getMember",
"(",
"\"location\"",
")",
")",
")",
";",
"... | The location for this elevation.
@return | [
"The",
"location",
"for",
"this",
"elevation",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/service/elevation/ElevationResult.java#L39-L44 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptRuntime.java | JavascriptRuntime.getArgString | protected String getArgString(Object arg) {
//if (arg instanceof LatLong) {
// return ((LatLong) arg).getVariableName();
//} else
if (arg instanceof JavascriptObject) {
return ((JavascriptObject) arg).getVariableName();
// return ((JavascriptObject) arg).getPr... | java | protected String getArgString(Object arg) {
//if (arg instanceof LatLong) {
// return ((LatLong) arg).getVariableName();
//} else
if (arg instanceof JavascriptObject) {
return ((JavascriptObject) arg).getVariableName();
// return ((JavascriptObject) arg).getPr... | [
"protected",
"String",
"getArgString",
"(",
"Object",
"arg",
")",
"{",
"//if (arg instanceof LatLong) {",
"// return ((LatLong) arg).getVariableName();",
"//} else ",
"if",
"(",
"arg",
"instanceof",
"JavascriptObject",
")",
"{",
"return",
"(",
"(",
"JavascriptObject",
... | Takes the specified object and converts the argument to a String.
@param arg The object to convert
@return A String representation of the argument. | [
"Takes",
"the",
"specified",
"object",
"and",
"converts",
"the",
"argument",
"to",
"a",
"String",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/JavascriptRuntime.java#L181-L193 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/DirectionsPane.java | DirectionsPane.registerEventHandler | private String registerEventHandler(GFXEventHandler h) {
//checkInitialized();
if (!registeredOnJS) {
JSObject doc = (JSObject) runtime.execute("document");
doc.setMember("jsHandlers", jsHandlers);
registeredOnJS = true;
}
return jsHandlers.registerHan... | java | private String registerEventHandler(GFXEventHandler h) {
//checkInitialized();
if (!registeredOnJS) {
JSObject doc = (JSObject) runtime.execute("document");
doc.setMember("jsHandlers", jsHandlers);
registeredOnJS = true;
}
return jsHandlers.registerHan... | [
"private",
"String",
"registerEventHandler",
"(",
"GFXEventHandler",
"h",
")",
"{",
"//checkInitialized();",
"if",
"(",
"!",
"registeredOnJS",
")",
"{",
"JSObject",
"doc",
"=",
"(",
"JSObject",
")",
"runtime",
".",
"execute",
"(",
"\"document\"",
")",
";",
"do... | Registers an event handler in the repository shared between Javascript
and Java.
@param h Event handler to be registered.
@return Callback key that Javascript will use to find this handler. | [
"Registers",
"an",
"event",
"handler",
"in",
"the",
"repository",
"shared",
"between",
"Javascript",
"and",
"Java",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/DirectionsPane.java#L211-L219 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/DirectionsPane.java | DirectionsPane.addUIEventHandler | public void addUIEventHandler(JavascriptObject obj, UIEventType type, UIEventHandler h) {
String key = registerEventHandler(h);
String mcall = "google.maps.event.addListener(" + obj.getVariableName() + ", '" + type.name() + "', "
+ "function(event) {document.jsHandlers.handleUIEvent('" +... | java | public void addUIEventHandler(JavascriptObject obj, UIEventType type, UIEventHandler h) {
String key = registerEventHandler(h);
String mcall = "google.maps.event.addListener(" + obj.getVariableName() + ", '" + type.name() + "', "
+ "function(event) {document.jsHandlers.handleUIEvent('" +... | [
"public",
"void",
"addUIEventHandler",
"(",
"JavascriptObject",
"obj",
",",
"UIEventType",
"type",
",",
"UIEventHandler",
"h",
")",
"{",
"String",
"key",
"=",
"registerEventHandler",
"(",
"h",
")",
";",
"String",
"mcall",
"=",
"\"google.maps.event.addListener(\"",
... | Adds a handler for a mouse type event on the map.
@param obj The object that the event should be registered on.
@param type Type of the event to register against.
@param h Handler that will be called when the event occurs. | [
"Adds",
"a",
"handler",
"for",
"a",
"mouse",
"type",
"event",
"on",
"the",
"map",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/DirectionsPane.java#L238-L244 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/LatLong.java | LatLong.distanceFrom | public double distanceFrom(LatLong end) {
double dLat = (end.getLatitude() - getLatitude()) * Math.PI / 180;
double dLon = (end.getLongitude() - getLongitude()) * Math.PI / 180;
double a = Math.sin(dLat / 2) * Math.sin(dLat / 2)
+ Math.cos(getLatitude() * Math.PI / 180)
... | java | public double distanceFrom(LatLong end) {
double dLat = (end.getLatitude() - getLatitude()) * Math.PI / 180;
double dLon = (end.getLongitude() - getLongitude()) * Math.PI / 180;
double a = Math.sin(dLat / 2) * Math.sin(dLat / 2)
+ Math.cos(getLatitude() * Math.PI / 180)
... | [
"public",
"double",
"distanceFrom",
"(",
"LatLong",
"end",
")",
"{",
"double",
"dLat",
"=",
"(",
"end",
".",
"getLatitude",
"(",
")",
"-",
"getLatitude",
"(",
")",
")",
"*",
"Math",
".",
"PI",
"/",
"180",
";",
"double",
"dLon",
"=",
"(",
"end",
"."... | From v3_epoly.js, calculates the distance between this LatLong point and
another.
@param end The end point to calculate the distance to.
@return The distance, in metres, to the end point. | [
"From",
"v3_epoly",
".",
"js",
"calculates",
"the",
"distance",
"between",
"this",
"LatLong",
"point",
"and",
"another",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/LatLong.java#L58-L71 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/LatLong.java | LatLong.getDestinationPoint | public LatLong getDestinationPoint(double bearing, double distance) {
double brng = Math.toRadians(bearing);
double lat1 = latToRadians();
double lon1 = longToRadians();
double lat2 = Math.asin(Math.sin(lat1)
* Math.cos(distance / EarthRadiusMeters)
+ M... | java | public LatLong getDestinationPoint(double bearing, double distance) {
double brng = Math.toRadians(bearing);
double lat1 = latToRadians();
double lon1 = longToRadians();
double lat2 = Math.asin(Math.sin(lat1)
* Math.cos(distance / EarthRadiusMeters)
+ M... | [
"public",
"LatLong",
"getDestinationPoint",
"(",
"double",
"bearing",
",",
"double",
"distance",
")",
"{",
"double",
"brng",
"=",
"Math",
".",
"toRadians",
"(",
"bearing",
")",
";",
"double",
"lat1",
"=",
"latToRadians",
"(",
")",
";",
"double",
"lon1",
"=... | Calculates the LatLong position of the end point of a line the specified
distance from this LatLong, along the provided bearing, where North is 0,
East is 90 etc.
@param bearing The bearing, in degrees, with North as 0, East as 90 etc.
@param distance The distance in metres.
@return A new LatLong indicating the end po... | [
"Calculates",
"the",
"LatLong",
"position",
"of",
"the",
"end",
"point",
"of",
"a",
"line",
"the",
"specified",
"distance",
"from",
"this",
"LatLong",
"along",
"the",
"provided",
"bearing",
"where",
"North",
"is",
"0",
"East",
"is",
"90",
"etc",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/LatLong.java#L100-L119 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/LatLong.java | LatLong.getBearing | public double getBearing(LatLong end) {
if (this.equals(end)) {
return 0;
}
double lat1 = latToRadians();
double lon1 = longToRadians();
double lat2 = end.latToRadians();
double lon2 = end.longToRadians();
double angle = -Math.atan2(Math.sin(lon1 - l... | java | public double getBearing(LatLong end) {
if (this.equals(end)) {
return 0;
}
double lat1 = latToRadians();
double lon1 = longToRadians();
double lat2 = end.latToRadians();
double lon2 = end.longToRadians();
double angle = -Math.atan2(Math.sin(lon1 - l... | [
"public",
"double",
"getBearing",
"(",
"LatLong",
"end",
")",
"{",
"if",
"(",
"this",
".",
"equals",
"(",
"end",
")",
")",
"{",
"return",
"0",
";",
"}",
"double",
"lat1",
"=",
"latToRadians",
"(",
")",
";",
"double",
"lon1",
"=",
"longToRadians",
"("... | Calculates the bearing, in degrees, of the end LatLong point from this
LatLong point.
@param end The point that the bearing is calculated for.
@return The bearing, in degrees, of the supplied point from this point. | [
"Calculates",
"the",
"bearing",
"in",
"degrees",
"of",
"the",
"end",
"LatLong",
"point",
"from",
"this",
"LatLong",
"point",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/javascript/object/LatLong.java#L128-L150 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/service/elevation/ElevationService.java | ElevationService.getElevationForLocations | public void getElevationForLocations(LocationElevationRequest req, ElevationServiceCallback callback) {
this.callback = callback;
JSObject doc = (JSObject) getJSObject().eval("document");
doc.setMember(getVariableName(), this);
StringBuilder r = new StringBuild... | java | public void getElevationForLocations(LocationElevationRequest req, ElevationServiceCallback callback) {
this.callback = callback;
JSObject doc = (JSObject) getJSObject().eval("document");
doc.setMember(getVariableName(), this);
StringBuilder r = new StringBuild... | [
"public",
"void",
"getElevationForLocations",
"(",
"LocationElevationRequest",
"req",
",",
"ElevationServiceCallback",
"callback",
")",
"{",
"this",
".",
"callback",
"=",
"callback",
";",
"JSObject",
"doc",
"=",
"(",
"JSObject",
")",
"getJSObject",
"(",
")",
".",
... | Create a request for elevations for multiple locations.
@param req
@param callback | [
"Create",
"a",
"request",
"for",
"elevations",
"for",
"multiple",
"locations",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/service/elevation/ElevationService.java#L36-L56 | train |
rterp/GMapsFX | GMapsFX/src/main/java/com/lynden/gmapsfx/service/elevation/ElevationService.java | ElevationService.getElevationAlongPath | public void getElevationAlongPath(PathElevationRequest req, ElevationServiceCallback callback) {
this.callback = callback;
JSObject doc = (JSObject) getJSObject().eval("document");
doc.setMember(getVariableName(), this);
StringBuilder r = new StringBuilder(getV... | java | public void getElevationAlongPath(PathElevationRequest req, ElevationServiceCallback callback) {
this.callback = callback;
JSObject doc = (JSObject) getJSObject().eval("document");
doc.setMember(getVariableName(), this);
StringBuilder r = new StringBuilder(getV... | [
"public",
"void",
"getElevationAlongPath",
"(",
"PathElevationRequest",
"req",
",",
"ElevationServiceCallback",
"callback",
")",
"{",
"this",
".",
"callback",
"=",
"callback",
";",
"JSObject",
"doc",
"=",
"(",
"JSObject",
")",
"getJSObject",
"(",
")",
".",
"eval... | Create a request for elevations for samples along a path.
@param req
@param callback | [
"Create",
"a",
"request",
"for",
"elevations",
"for",
"samples",
"along",
"a",
"path",
"."
] | 4623d3f768e8ad78fc50ee32dd204d236e01059f | https://github.com/rterp/GMapsFX/blob/4623d3f768e8ad78fc50ee32dd204d236e01059f/GMapsFX/src/main/java/com/lynden/gmapsfx/service/elevation/ElevationService.java#L63-L81 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/comparators/GeopositionComparator.java | GeopositionComparator.distance | public static double distance(double lat1, double lon1,
double lat2, double lon2) {
double dLat = Math.toRadians(lat2-lat1);
double dLon = Math.toRadians(lon2-lon1);
lat1 = Math.toRadians(lat1);
lat2 = Math.toRadians(lat2);
double a = Math.sin(dLat/2) * Math.sin(dLat... | java | public static double distance(double lat1, double lon1,
double lat2, double lon2) {
double dLat = Math.toRadians(lat2-lat1);
double dLon = Math.toRadians(lon2-lon1);
lat1 = Math.toRadians(lat1);
lat2 = Math.toRadians(lat2);
double a = Math.sin(dLat/2) * Math.sin(dLat... | [
"public",
"static",
"double",
"distance",
"(",
"double",
"lat1",
",",
"double",
"lon1",
",",
"double",
"lat2",
",",
"double",
"lon2",
")",
"{",
"double",
"dLat",
"=",
"Math",
".",
"toRadians",
"(",
"lat2",
"-",
"lat1",
")",
";",
"double",
"dLon",
"=",
... | Returns the distance between the two points in meters. | [
"Returns",
"the",
"distance",
"between",
"the",
"two",
"points",
"in",
"meters",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/comparators/GeopositionComparator.java#L72-L83 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/comparators/SoundexComparator.java | SoundexComparator.soundex | public static String soundex(String str) {
if (str.length() < 1)
return ""; // no soundex key for the empty string (could use 000)
char[] key = new char[4];
key[0] = str.charAt(0);
int pos = 1;
char prev = '0';
for (int ix = 1; ix < str.length() && pos < 4; ix++) {
char ch = str... | java | public static String soundex(String str) {
if (str.length() < 1)
return ""; // no soundex key for the empty string (could use 000)
char[] key = new char[4];
key[0] = str.charAt(0);
int pos = 1;
char prev = '0';
for (int ix = 1; ix < str.length() && pos < 4; ix++) {
char ch = str... | [
"public",
"static",
"String",
"soundex",
"(",
"String",
"str",
")",
"{",
"if",
"(",
"str",
".",
"length",
"(",
")",
"<",
"1",
")",
"return",
"\"\"",
";",
"// no soundex key for the empty string (could use 000)",
"char",
"[",
"]",
"key",
"=",
"new",
"char",
... | Produces the Soundex key for the given string. | [
"Produces",
"the",
"Soundex",
"key",
"for",
"the",
"given",
"string",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/comparators/SoundexComparator.java#L33-L60 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/comparators/SoundexComparator.java | SoundexComparator.buildTable | private static char[] buildTable() {
char[] table = new char[26];
for (int ix = 0; ix < table.length; ix++)
table[ix] = '0';
table['B' - 'A'] = '1';
table['P' - 'A'] = '1';
table['F' - 'A'] = '1';
table['V' - 'A'] = '1';
table['C' - 'A'] = '2';
table['S' - 'A'] = '2';
table['K'... | java | private static char[] buildTable() {
char[] table = new char[26];
for (int ix = 0; ix < table.length; ix++)
table[ix] = '0';
table['B' - 'A'] = '1';
table['P' - 'A'] = '1';
table['F' - 'A'] = '1';
table['V' - 'A'] = '1';
table['C' - 'A'] = '2';
table['S' - 'A'] = '2';
table['K'... | [
"private",
"static",
"char",
"[",
"]",
"buildTable",
"(",
")",
"{",
"char",
"[",
"]",
"table",
"=",
"new",
"char",
"[",
"26",
"]",
";",
"for",
"(",
"int",
"ix",
"=",
"0",
";",
"ix",
"<",
"table",
".",
"length",
";",
"ix",
"++",
")",
"table",
... | Builds the mapping table. | [
"Builds",
"the",
"mapping",
"table",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/comparators/SoundexComparator.java#L65-L88 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/datasources/NTriplesDataSource.java | NTriplesDataSource.addStatement | private void addStatement(RecordImpl record,
String subject,
String property,
String object) {
Collection<Column> cols = columns.get(property);
if (cols == null) {
if (property.equals(RDF_TYPE) && !types.isEmpty())
... | java | private void addStatement(RecordImpl record,
String subject,
String property,
String object) {
Collection<Column> cols = columns.get(property);
if (cols == null) {
if (property.equals(RDF_TYPE) && !types.isEmpty())
... | [
"private",
"void",
"addStatement",
"(",
"RecordImpl",
"record",
",",
"String",
"subject",
",",
"String",
"property",
",",
"String",
"object",
")",
"{",
"Collection",
"<",
"Column",
">",
"cols",
"=",
"columns",
".",
"get",
"(",
"property",
")",
";",
"if",
... | common utility method for adding a statement to a record | [
"common",
"utility",
"method",
"for",
"adding",
"a",
"statement",
"to",
"a",
"record"
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/datasources/NTriplesDataSource.java#L89-L107 | train |
larsga/Duke | duke-lucene/src/main/java/no/priv/garshol/duke/databases/GeoProperty.java | GeoProperty.geoSearch | public Filter geoSearch(String value) {
GeopositionComparator comp = (GeopositionComparator) prop.getComparator();
double dist = comp.getMaxDistance();
double degrees = DistanceUtils.dist2Degrees(dist, DistanceUtils.EARTH_MEAN_RADIUS_KM * 1000.0);
Shape circle = spatialctx.makeCircle(parsePoint(value), ... | java | public Filter geoSearch(String value) {
GeopositionComparator comp = (GeopositionComparator) prop.getComparator();
double dist = comp.getMaxDistance();
double degrees = DistanceUtils.dist2Degrees(dist, DistanceUtils.EARTH_MEAN_RADIUS_KM * 1000.0);
Shape circle = spatialctx.makeCircle(parsePoint(value), ... | [
"public",
"Filter",
"geoSearch",
"(",
"String",
"value",
")",
"{",
"GeopositionComparator",
"comp",
"=",
"(",
"GeopositionComparator",
")",
"prop",
".",
"getComparator",
"(",
")",
";",
"double",
"dist",
"=",
"comp",
".",
"getMaxDistance",
"(",
")",
";",
"dou... | Returns a geoquery. | [
"Returns",
"a",
"geoquery",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-lucene/src/main/java/no/priv/garshol/duke/databases/GeoProperty.java#L57-L64 | train |
larsga/Duke | duke-lucene/src/main/java/no/priv/garshol/duke/databases/GeoProperty.java | GeoProperty.parsePoint | private Point parsePoint(String point) {
int comma = point.indexOf(',');
if (comma == -1)
return null;
float lat = Float.valueOf(point.substring(0, comma));
float lng = Float.valueOf(point.substring(comma + 1));
return spatialctx.makePoint(lng, lat);
} | java | private Point parsePoint(String point) {
int comma = point.indexOf(',');
if (comma == -1)
return null;
float lat = Float.valueOf(point.substring(0, comma));
float lng = Float.valueOf(point.substring(comma + 1));
return spatialctx.makePoint(lng, lat);
} | [
"private",
"Point",
"parsePoint",
"(",
"String",
"point",
")",
"{",
"int",
"comma",
"=",
"point",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"comma",
"==",
"-",
"1",
")",
"return",
"null",
";",
"float",
"lat",
"=",
"Float",
".",
"valueOf",... | Parses coordinates into a Spatial4j point shape. | [
"Parses",
"coordinates",
"into",
"a",
"Spatial4j",
"point",
"shape",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-lucene/src/main/java/no/priv/garshol/duke/databases/GeoProperty.java#L69-L77 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/utils/JDBCUtils.java | JDBCUtils.open | public static Statement open(String jndiPath) {
try {
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup(jndiPath);
Connection conn = ds.getConnection();
return conn.createStatement();
} catch (NamingException e) {
throw new DukeException("No database confi... | java | public static Statement open(String jndiPath) {
try {
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup(jndiPath);
Connection conn = ds.getConnection();
return conn.createStatement();
} catch (NamingException e) {
throw new DukeException("No database confi... | [
"public",
"static",
"Statement",
"open",
"(",
"String",
"jndiPath",
")",
"{",
"try",
"{",
"Context",
"ctx",
"=",
"new",
"InitialContext",
"(",
")",
";",
"DataSource",
"ds",
"=",
"(",
"DataSource",
")",
"ctx",
".",
"lookup",
"(",
"jndiPath",
")",
";",
"... | Get a configured database connection via JNDI. | [
"Get",
"a",
"configured",
"database",
"connection",
"via",
"JNDI",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/JDBCUtils.java#L25-L38 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/utils/JDBCUtils.java | JDBCUtils.open | public static Statement open(String driverklass, String jdbcuri,
Properties props) {
try {
Driver driver = (Driver) ObjectUtils.instantiate(driverklass);
Connection conn = driver.connect(jdbcuri, props);
if (conn == null)
throw new DukeException("Couldn't con... | java | public static Statement open(String driverklass, String jdbcuri,
Properties props) {
try {
Driver driver = (Driver) ObjectUtils.instantiate(driverklass);
Connection conn = driver.connect(jdbcuri, props);
if (conn == null)
throw new DukeException("Couldn't con... | [
"public",
"static",
"Statement",
"open",
"(",
"String",
"driverklass",
",",
"String",
"jdbcuri",
",",
"Properties",
"props",
")",
"{",
"try",
"{",
"Driver",
"driver",
"=",
"(",
"Driver",
")",
"ObjectUtils",
".",
"instantiate",
"(",
"driverklass",
")",
";",
... | Opens a JDBC connection with the given parameters. | [
"Opens",
"a",
"JDBC",
"connection",
"with",
"the",
"given",
"parameters",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/JDBCUtils.java#L43-L56 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/utils/JDBCUtils.java | JDBCUtils.close | public static void close(Statement stmt) {
try {
Connection conn = stmt.getConnection();
try {
if (!stmt.isClosed())
stmt.close();
} catch (UnsupportedOperationException e) {
// not all JDBC drivers implement the isClosed() method.
// ugly, but probably the only w... | java | public static void close(Statement stmt) {
try {
Connection conn = stmt.getConnection();
try {
if (!stmt.isClosed())
stmt.close();
} catch (UnsupportedOperationException e) {
// not all JDBC drivers implement the isClosed() method.
// ugly, but probably the only w... | [
"public",
"static",
"void",
"close",
"(",
"Statement",
"stmt",
")",
"{",
"try",
"{",
"Connection",
"conn",
"=",
"stmt",
".",
"getConnection",
"(",
")",
";",
"try",
"{",
"if",
"(",
"!",
"stmt",
".",
"isClosed",
"(",
")",
")",
"stmt",
".",
"close",
"... | Closes the JDBC statement and its associated connection. | [
"Closes",
"the",
"JDBC",
"statement",
"and",
"its",
"associated",
"connection",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/JDBCUtils.java#L61-L78 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/utils/JDBCUtils.java | JDBCUtils.validate | public static boolean validate(Statement stmt) {
try {
Connection conn = stmt.getConnection();
if (conn == null)
return false;
if (!conn.isClosed() && conn.isValid(10))
return true;
stmt.close();
conn.close();
} catch (SQLException e) {
// this may well fail... | java | public static boolean validate(Statement stmt) {
try {
Connection conn = stmt.getConnection();
if (conn == null)
return false;
if (!conn.isClosed() && conn.isValid(10))
return true;
stmt.close();
conn.close();
} catch (SQLException e) {
// this may well fail... | [
"public",
"static",
"boolean",
"validate",
"(",
"Statement",
"stmt",
")",
"{",
"try",
"{",
"Connection",
"conn",
"=",
"stmt",
".",
"getConnection",
"(",
")",
";",
"if",
"(",
"conn",
"==",
"null",
")",
"return",
"false",
";",
"if",
"(",
"!",
"conn",
"... | Verifies that the connection is still alive. Returns true if it
is, false if it is not. If the connection is broken we try
closing everything, too, so that the caller need only open a new
connection. | [
"Verifies",
"that",
"the",
"connection",
"is",
"still",
"alive",
".",
"Returns",
"true",
"if",
"it",
"is",
"false",
"if",
"it",
"is",
"not",
".",
"If",
"the",
"connection",
"is",
"broken",
"we",
"try",
"closing",
"everything",
"too",
"so",
"that",
"the",... | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/JDBCUtils.java#L86-L102 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/utils/JDBCUtils.java | JDBCUtils.queryForInt | public static int queryForInt(Statement stmt, String sql, int nullvalue) {
try {
ResultSet rs = stmt.executeQuery(sql);
try {
if (!rs.next())
return nullvalue;
return rs.getInt(1);
} finally {
rs.close();
}
} catch (SQLException e) {
throw... | java | public static int queryForInt(Statement stmt, String sql, int nullvalue) {
try {
ResultSet rs = stmt.executeQuery(sql);
try {
if (!rs.next())
return nullvalue;
return rs.getInt(1);
} finally {
rs.close();
}
} catch (SQLException e) {
throw... | [
"public",
"static",
"int",
"queryForInt",
"(",
"Statement",
"stmt",
",",
"String",
"sql",
",",
"int",
"nullvalue",
")",
"{",
"try",
"{",
"ResultSet",
"rs",
"=",
"stmt",
".",
"executeQuery",
"(",
"sql",
")",
";",
"try",
"{",
"if",
"(",
"!",
"rs",
".",... | Runs a query that returns a single int. | [
"Runs",
"a",
"query",
"that",
"returns",
"a",
"single",
"int",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/JDBCUtils.java#L107-L121 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/utils/JDBCUtils.java | JDBCUtils.queryHasResult | public static boolean queryHasResult(Statement stmt, String sql) {
try {
ResultSet rs = stmt.executeQuery(sql);
try {
return rs.next();
} finally {
rs.close();
}
} catch (SQLException e) {
throw new DukeException(e);
}
} | java | public static boolean queryHasResult(Statement stmt, String sql) {
try {
ResultSet rs = stmt.executeQuery(sql);
try {
return rs.next();
} finally {
rs.close();
}
} catch (SQLException e) {
throw new DukeException(e);
}
} | [
"public",
"static",
"boolean",
"queryHasResult",
"(",
"Statement",
"stmt",
",",
"String",
"sql",
")",
"{",
"try",
"{",
"ResultSet",
"rs",
"=",
"stmt",
".",
"executeQuery",
"(",
"sql",
")",
";",
"try",
"{",
"return",
"rs",
".",
"next",
"(",
")",
";",
... | Returns true if the query result has at least one row. | [
"Returns",
"true",
"if",
"the",
"query",
"result",
"has",
"at",
"least",
"one",
"row",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/JDBCUtils.java#L126-L137 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/utils/StringUtils.java | StringUtils.replaceAnyOf | public static String replaceAnyOf(String value, String chars,
char replacement) {
char[] tmp = new char[value.length()];
int pos = 0;
for (int ix = 0; ix < tmp.length; ix++) {
char ch = value.charAt(ix);
if (chars.indexOf(ch) != -1)
tmp[pos++] = replac... | java | public static String replaceAnyOf(String value, String chars,
char replacement) {
char[] tmp = new char[value.length()];
int pos = 0;
for (int ix = 0; ix < tmp.length; ix++) {
char ch = value.charAt(ix);
if (chars.indexOf(ch) != -1)
tmp[pos++] = replac... | [
"public",
"static",
"String",
"replaceAnyOf",
"(",
"String",
"value",
",",
"String",
"chars",
",",
"char",
"replacement",
")",
"{",
"char",
"[",
"]",
"tmp",
"=",
"new",
"char",
"[",
"value",
".",
"length",
"(",
")",
"]",
";",
"int",
"pos",
"=",
"0",
... | Replaces all characters in the second parameter found in the first
parameter with the final character.
@param value the string to replace characters in
@param chars the characters to replace
@param replacement the character to insert as replacement | [
"Replaces",
"all",
"characters",
"in",
"the",
"second",
"parameter",
"found",
"in",
"the",
"first",
"parameter",
"with",
"the",
"final",
"character",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/StringUtils.java#L13-L25 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/utils/StringUtils.java | StringUtils.normalizeWS | public static String normalizeWS(String value) {
char[] tmp = new char[value.length()];
int pos = 0;
boolean prevws = false;
for (int ix = 0; ix < tmp.length; ix++) {
char ch = value.charAt(ix);
if (ch != ' ' && ch != '\t' && ch != '\n' && ch != '\r') {
if (prevws && pos != 0)
... | java | public static String normalizeWS(String value) {
char[] tmp = new char[value.length()];
int pos = 0;
boolean prevws = false;
for (int ix = 0; ix < tmp.length; ix++) {
char ch = value.charAt(ix);
if (ch != ' ' && ch != '\t' && ch != '\n' && ch != '\r') {
if (prevws && pos != 0)
... | [
"public",
"static",
"String",
"normalizeWS",
"(",
"String",
"value",
")",
"{",
"char",
"[",
"]",
"tmp",
"=",
"new",
"char",
"[",
"value",
".",
"length",
"(",
")",
"]",
";",
"int",
"pos",
"=",
"0",
";",
"boolean",
"prevws",
"=",
"false",
";",
"for",... | Removes trailing and leading whitespace, and also reduces each
sequence of internal whitespace to a single space. | [
"Removes",
"trailing",
"and",
"leading",
"whitespace",
"and",
"also",
"reduces",
"each",
"sequence",
"of",
"internal",
"whitespace",
"to",
"a",
"single",
"space",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/StringUtils.java#L31-L47 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/utils/PropertyUtils.java | PropertyUtils.get | public static String get(Properties props, String name, String defval) {
String value = props.getProperty(name);
if (value == null)
value = defval;
return value;
} | java | public static String get(Properties props, String name, String defval) {
String value = props.getProperty(name);
if (value == null)
value = defval;
return value;
} | [
"public",
"static",
"String",
"get",
"(",
"Properties",
"props",
",",
"String",
"name",
",",
"String",
"defval",
")",
"{",
"String",
"value",
"=",
"props",
".",
"getProperty",
"(",
"name",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"value",
"=",
... | Returns the value of an optional property, if the property is
set. If it is not set defval is returned. | [
"Returns",
"the",
"value",
"of",
"an",
"optional",
"property",
"if",
"the",
"property",
"is",
"set",
".",
"If",
"it",
"is",
"not",
"set",
"defval",
"is",
"returned",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/PropertyUtils.java#L28-L33 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/ConfigurationImpl.java | ConfigurationImpl.getDataSources | public Collection<DataSource> getDataSources(int groupno) {
if (groupno == 1)
return group1;
else if (groupno == 2)
return group2;
else
throw new DukeConfigException("Invalid group number: " + groupno);
} | java | public Collection<DataSource> getDataSources(int groupno) {
if (groupno == 1)
return group1;
else if (groupno == 2)
return group2;
else
throw new DukeConfigException("Invalid group number: " + groupno);
} | [
"public",
"Collection",
"<",
"DataSource",
">",
"getDataSources",
"(",
"int",
"groupno",
")",
"{",
"if",
"(",
"groupno",
"==",
"1",
")",
"return",
"group1",
";",
"else",
"if",
"(",
"groupno",
"==",
"2",
")",
"return",
"group2",
";",
"else",
"throw",
"n... | Returns the data sources belonging to a particular group of data
sources. Data sources are grouped in record linkage mode, but not
in deduplication mode, so only use this method in record linkage
mode. | [
"Returns",
"the",
"data",
"sources",
"belonging",
"to",
"a",
"particular",
"group",
"of",
"data",
"sources",
".",
"Data",
"sources",
"are",
"grouped",
"in",
"record",
"linkage",
"mode",
"but",
"not",
"in",
"deduplication",
"mode",
"so",
"only",
"use",
"this"... | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/ConfigurationImpl.java#L59-L66 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/ConfigurationImpl.java | ConfigurationImpl.addDataSource | public void addDataSource(int groupno, DataSource datasource) {
// the loader takes care of validation
if (groupno == 0)
datasources.add(datasource);
else if (groupno == 1)
group1.add(datasource);
else if (groupno == 2)
group2.add(datasource);
} | java | public void addDataSource(int groupno, DataSource datasource) {
// the loader takes care of validation
if (groupno == 0)
datasources.add(datasource);
else if (groupno == 1)
group1.add(datasource);
else if (groupno == 2)
group2.add(datasource);
} | [
"public",
"void",
"addDataSource",
"(",
"int",
"groupno",
",",
"DataSource",
"datasource",
")",
"{",
"// the loader takes care of validation",
"if",
"(",
"groupno",
"==",
"0",
")",
"datasources",
".",
"add",
"(",
"datasource",
")",
";",
"else",
"if",
"(",
"gro... | Adds a data source to the configuration. If in deduplication mode
groupno == 0, otherwise it gives the number of the group to which
the data source belongs. | [
"Adds",
"a",
"data",
"source",
"to",
"the",
"configuration",
".",
"If",
"in",
"deduplication",
"mode",
"groupno",
"==",
"0",
"otherwise",
"it",
"gives",
"the",
"number",
"of",
"the",
"group",
"to",
"which",
"the",
"data",
"source",
"belongs",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/ConfigurationImpl.java#L73-L81 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/PropertyImpl.java | PropertyImpl.compare | public double compare(String v1, String v2) {
// FIXME: it should be possible here to say that, actually, we
// didn't learn anything from comparing these two values, so that
// probability is set to 0.5.
if (comparator == null)
return 0.5; // we ignore properties with no comparator
// first... | java | public double compare(String v1, String v2) {
// FIXME: it should be possible here to say that, actually, we
// didn't learn anything from comparing these two values, so that
// probability is set to 0.5.
if (comparator == null)
return 0.5; // we ignore properties with no comparator
// first... | [
"public",
"double",
"compare",
"(",
"String",
"v1",
",",
"String",
"v2",
")",
"{",
"// FIXME: it should be possible here to say that, actually, we",
"// didn't learn anything from comparing these two values, so that",
"// probability is set to 0.5.",
"if",
"(",
"comparator",
"==",
... | Returns the probability that the records v1 and v2 came from
represent the same entity, based on high and low probability
settings etc. | [
"Returns",
"the",
"probability",
"that",
"the",
"records",
"v1",
"and",
"v2",
"came",
"from",
"represent",
"the",
"same",
"entity",
"based",
"on",
"high",
"and",
"low",
"probability",
"settings",
"etc",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/PropertyImpl.java#L121-L155 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/datasources/SparqlDataSource.java | SparqlDataSource.runQuery | public SparqlResult runQuery(String endpoint, String query) {
return SparqlClient.execute(endpoint, query, username, password);
} | java | public SparqlResult runQuery(String endpoint, String query) {
return SparqlClient.execute(endpoint, query, username, password);
} | [
"public",
"SparqlResult",
"runQuery",
"(",
"String",
"endpoint",
",",
"String",
"query",
")",
"{",
"return",
"SparqlClient",
".",
"execute",
"(",
"endpoint",
",",
"query",
",",
"username",
",",
"password",
")",
";",
"}"
] | An extension point so we can control how the query gets executed.
This exists for testing purposes, not because we believe it will
actually be used for real. | [
"An",
"extension",
"point",
"so",
"we",
"can",
"control",
"how",
"the",
"query",
"gets",
"executed",
".",
"This",
"exists",
"for",
"testing",
"purposes",
"not",
"because",
"we",
"believe",
"it",
"will",
"actually",
"be",
"used",
"for",
"real",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/datasources/SparqlDataSource.java#L123-L125 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/InMemoryClassDatabase.java | InMemoryClassDatabase.merge | private void merge(Integer cid1, Integer cid2) {
Collection<String> klass1 = classix.get(cid1);
Collection<String> klass2 = classix.get(cid2);
// if klass1 is the smaller, swap the two
if (klass1.size() < klass2.size()) {
Collection<String> tmp = klass2;
klass2 = klass1;
klass1 = tmp;... | java | private void merge(Integer cid1, Integer cid2) {
Collection<String> klass1 = classix.get(cid1);
Collection<String> klass2 = classix.get(cid2);
// if klass1 is the smaller, swap the two
if (klass1.size() < klass2.size()) {
Collection<String> tmp = klass2;
klass2 = klass1;
klass1 = tmp;... | [
"private",
"void",
"merge",
"(",
"Integer",
"cid1",
",",
"Integer",
"cid2",
")",
"{",
"Collection",
"<",
"String",
">",
"klass1",
"=",
"classix",
".",
"get",
"(",
"cid1",
")",
";",
"Collection",
"<",
"String",
">",
"klass2",
"=",
"classix",
".",
"get",... | Merges the two classes into a single class. The smaller class is
removed, while the largest class is kept. | [
"Merges",
"the",
"two",
"classes",
"into",
"a",
"single",
"class",
".",
"The",
"smaller",
"class",
"is",
"removed",
"while",
"the",
"largest",
"class",
"is",
"kept",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/InMemoryClassDatabase.java#L91-L114 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/databases/KeyValueDatabase.java | KeyValueDatabase.bumpScores | private void bumpScores(Map<Long, Score> candidates,
List<Bucket> buckets,
int ix) {
for (; ix < buckets.size(); ix++) {
Bucket b = buckets.get(ix);
if (b.nextfree > CUTOFF_FACTOR_2 * candidates.size())
return;
double score = b.getScore()... | java | private void bumpScores(Map<Long, Score> candidates,
List<Bucket> buckets,
int ix) {
for (; ix < buckets.size(); ix++) {
Bucket b = buckets.get(ix);
if (b.nextfree > CUTOFF_FACTOR_2 * candidates.size())
return;
double score = b.getScore()... | [
"private",
"void",
"bumpScores",
"(",
"Map",
"<",
"Long",
",",
"Score",
">",
"candidates",
",",
"List",
"<",
"Bucket",
">",
"buckets",
",",
"int",
"ix",
")",
"{",
"for",
"(",
";",
"ix",
"<",
"buckets",
".",
"size",
"(",
")",
";",
"ix",
"++",
")",... | Goes through the buckets from ix and out, checking for each
candidate if it's in one of the buckets, and if so, increasing
its score accordingly. No new candidates are added. | [
"Goes",
"through",
"the",
"buckets",
"from",
"ix",
"and",
"out",
"checking",
"for",
"each",
"candidate",
"if",
"it",
"s",
"in",
"one",
"of",
"the",
"buckets",
"and",
"if",
"so",
"increasing",
"its",
"score",
"accordingly",
".",
"No",
"new",
"candidates",
... | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/databases/KeyValueDatabase.java#L213-L225 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/databases/KeyValueDatabase.java | KeyValueDatabase.collectCandidates | private int collectCandidates(Map<Long, Score> candidates,
List<Bucket> buckets,
int threshold) {
int ix;
for (ix = 0; ix < threshold &&
candidates.size() < (CUTOFF_FACTOR_1 * max_search_hits); ix++) {
Bucket b = buckets.get(ix);
... | java | private int collectCandidates(Map<Long, Score> candidates,
List<Bucket> buckets,
int threshold) {
int ix;
for (ix = 0; ix < threshold &&
candidates.size() < (CUTOFF_FACTOR_1 * max_search_hits); ix++) {
Bucket b = buckets.get(ix);
... | [
"private",
"int",
"collectCandidates",
"(",
"Map",
"<",
"Long",
",",
"Score",
">",
"candidates",
",",
"List",
"<",
"Bucket",
">",
"buckets",
",",
"int",
"threshold",
")",
"{",
"int",
"ix",
";",
"for",
"(",
"ix",
"=",
"0",
";",
"ix",
"<",
"threshold",... | Goes through the first buckets, picking out candidate records and
tallying up their scores.
@return the index of the first bucket we did not process | [
"Goes",
"through",
"the",
"first",
"buckets",
"picking",
"out",
"candidate",
"records",
"and",
"tallying",
"up",
"their",
"scores",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/databases/KeyValueDatabase.java#L232-L254 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/databases/KeyValueDatabase.java | KeyValueDatabase.lookup | private List<Bucket> lookup(Record record) {
List<Bucket> buckets = new ArrayList();
for (Property p : config.getLookupProperties()) {
String propname = p.getName();
Collection<String> values = record.getValues(propname);
if (values == null)
continue;
for (String value : values)... | java | private List<Bucket> lookup(Record record) {
List<Bucket> buckets = new ArrayList();
for (Property p : config.getLookupProperties()) {
String propname = p.getName();
Collection<String> values = record.getValues(propname);
if (values == null)
continue;
for (String value : values)... | [
"private",
"List",
"<",
"Bucket",
">",
"lookup",
"(",
"Record",
"record",
")",
"{",
"List",
"<",
"Bucket",
">",
"buckets",
"=",
"new",
"ArrayList",
"(",
")",
";",
"for",
"(",
"Property",
"p",
":",
"config",
".",
"getLookupProperties",
"(",
")",
")",
... | Tokenizes lookup fields and returns all matching buckets in the
index. | [
"Tokenizes",
"lookup",
"fields",
"and",
"returns",
"all",
"matching",
"buckets",
"in",
"the",
"index",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/databases/KeyValueDatabase.java#L260-L283 | train |
larsga/Duke | duke-server/src/main/java/no/priv/garshol/duke/server/CommonJTimer.java | CommonJTimer.spawnThread | public void spawnThread(DukeController controller, int check_interval) {
this.controller = controller;
timer = mgr.schedule(this, 0, check_interval * 1000); // convert to ms
} | java | public void spawnThread(DukeController controller, int check_interval) {
this.controller = controller;
timer = mgr.schedule(this, 0, check_interval * 1000); // convert to ms
} | [
"public",
"void",
"spawnThread",
"(",
"DukeController",
"controller",
",",
"int",
"check_interval",
")",
"{",
"this",
".",
"controller",
"=",
"controller",
";",
"timer",
"=",
"mgr",
".",
"schedule",
"(",
"this",
",",
"0",
",",
"check_interval",
"*",
"1000",
... | Starts a background thread which calls the controller every
check_interval milliseconds. Returns immediately, leaving the
background thread running. | [
"Starts",
"a",
"background",
"thread",
"which",
"calls",
"the",
"controller",
"every",
"check_interval",
"milliseconds",
".",
"Returns",
"immediately",
"leaving",
"the",
"background",
"thread",
"running",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-server/src/main/java/no/priv/garshol/duke/server/CommonJTimer.java#L45-L48 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/AbstractCmdlineTool.java | AbstractCmdlineTool.init | public String[] init(String[] argv, int min, int max,
Collection<CommandLineParser.Option> options)
throws IOException, SAXException {
// parse command line
parser = new CommandLineParser();
parser.setMinimumArguments(min);
parser.setMaximumArguments(max);
parser.registerO... | java | public String[] init(String[] argv, int min, int max,
Collection<CommandLineParser.Option> options)
throws IOException, SAXException {
// parse command line
parser = new CommandLineParser();
parser.setMinimumArguments(min);
parser.setMaximumArguments(max);
parser.registerO... | [
"public",
"String",
"[",
"]",
"init",
"(",
"String",
"[",
"]",
"argv",
",",
"int",
"min",
",",
"int",
"max",
",",
"Collection",
"<",
"CommandLineParser",
".",
"Option",
">",
"options",
")",
"throws",
"IOException",
",",
"SAXException",
"{",
"// parse comma... | These exact lines are shared between three different tools, so
they have been moved here to reduce code duplication.
@return The parsed command-line, with options removed. | [
"These",
"exact",
"lines",
"are",
"shared",
"between",
"three",
"different",
"tools",
"so",
"they",
"have",
"been",
"moved",
"here",
"to",
"reduce",
"code",
"duplication",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/AbstractCmdlineTool.java#L26-L60 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/utils/Utils.java | Utils.createTempDirectory | public static File createTempDirectory(String prefix) {
File temp = null;
try {
temp = File.createTempFile(prefix != null ? prefix : "temp", Long.toString(System.nanoTime()));
if (!(temp.delete())) {
throw new IOException("Could not delete temp file: "
+ temp.getAbsolutePath());
}
if (!(tem... | java | public static File createTempDirectory(String prefix) {
File temp = null;
try {
temp = File.createTempFile(prefix != null ? prefix : "temp", Long.toString(System.nanoTime()));
if (!(temp.delete())) {
throw new IOException("Could not delete temp file: "
+ temp.getAbsolutePath());
}
if (!(tem... | [
"public",
"static",
"File",
"createTempDirectory",
"(",
"String",
"prefix",
")",
"{",
"File",
"temp",
"=",
"null",
";",
"try",
"{",
"temp",
"=",
"File",
".",
"createTempFile",
"(",
"prefix",
"!=",
"null",
"?",
"prefix",
":",
"\"temp\"",
",",
"Long",
".",... | Creates a temporary folder using the given prefix to generate its name.
@param prefix the prefix string to be used in generating the directory's name; may be <i>null</i>
@return the <code>File</code> to the newly created folder
@throws IOException | [
"Creates",
"a",
"temporary",
"folder",
"using",
"the",
"given",
"prefix",
"to",
"generate",
"its",
"name",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/Utils.java#L36-L56 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/ConfigLoader.java | ConfigLoader.loadFromString | public static Configuration loadFromString(String config)
throws IOException, SAXException {
ConfigurationImpl cfg = new ConfigurationImpl();
XMLReader parser = XMLReaderFactory.createXMLReader();
parser.setContentHandler(new ConfigHandler(cfg, null));
Reader reader = new StringReader(config);
... | java | public static Configuration loadFromString(String config)
throws IOException, SAXException {
ConfigurationImpl cfg = new ConfigurationImpl();
XMLReader parser = XMLReaderFactory.createXMLReader();
parser.setContentHandler(new ConfigHandler(cfg, null));
Reader reader = new StringReader(config);
... | [
"public",
"static",
"Configuration",
"loadFromString",
"(",
"String",
"config",
")",
"throws",
"IOException",
",",
"SAXException",
"{",
"ConfigurationImpl",
"cfg",
"=",
"new",
"ConfigurationImpl",
"(",
")",
";",
"XMLReader",
"parser",
"=",
"XMLReaderFactory",
".",
... | Loads the configuration XML from the given string.
@since 1.3 | [
"Loads",
"the",
"configuration",
"XML",
"from",
"the",
"given",
"string",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/ConfigLoader.java#L58-L67 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/matchers/LinkDatabaseMatchListener.java | LinkDatabaseMatchListener.endRecord_ | public void endRecord_() {
// this is where we actually update the link database. basically,
// all we need to do is to retract those links which weren't seen
// this time around, and that can be done via assertLink, since it
// can override existing links.
// get all the existing links
Collect... | java | public void endRecord_() {
// this is where we actually update the link database. basically,
// all we need to do is to retract those links which weren't seen
// this time around, and that can be done via assertLink, since it
// can override existing links.
// get all the existing links
Collect... | [
"public",
"void",
"endRecord_",
"(",
")",
"{",
"// this is where we actually update the link database. basically,",
"// all we need to do is to retract those links which weren't seen",
"// this time around, and that can be done via assertLink, since it",
"// can override existing links.",
"// ge... | this method is called from the event methods | [
"this",
"method",
"is",
"called",
"from",
"the",
"event",
"methods"
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/matchers/LinkDatabaseMatchListener.java#L87-L137 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/ConfigWriter.java | ConfigWriter.write | public void write(Configuration config)
throws IOException {
pp.startDocument();
pp.startElement("duke", null);
// FIXME: here we should write the objects, but that's not
// possible with the current API. we don't need that for the
// genetic algorithm at the moment, but it would be useful.
... | java | public void write(Configuration config)
throws IOException {
pp.startDocument();
pp.startElement("duke", null);
// FIXME: here we should write the objects, but that's not
// possible with the current API. we don't need that for the
// genetic algorithm at the moment, but it would be useful.
... | [
"public",
"void",
"write",
"(",
"Configuration",
"config",
")",
"throws",
"IOException",
"{",
"pp",
".",
"startDocument",
"(",
")",
";",
"pp",
".",
"startElement",
"(",
"\"duke\"",
",",
"null",
")",
";",
"// FIXME: here we should write the objects, but that's not",
... | Writes the given configuration to the given file. | [
"Writes",
"the",
"given",
"configuration",
"to",
"the",
"given",
"file",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/ConfigWriter.java#L28-L72 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/utils/NTriplesParser.java | NTriplesParser.parse | public static void parse(Reader src, StatementHandler handler)
throws IOException {
new NTriplesParser(src, handler).parse();
} | java | public static void parse(Reader src, StatementHandler handler)
throws IOException {
new NTriplesParser(src, handler).parse();
} | [
"public",
"static",
"void",
"parse",
"(",
"Reader",
"src",
",",
"StatementHandler",
"handler",
")",
"throws",
"IOException",
"{",
"new",
"NTriplesParser",
"(",
"src",
",",
"handler",
")",
".",
"parse",
"(",
")",
";",
"}"
] | Reads the NTriples file from the reader, pushing statements into
the handler. | [
"Reads",
"the",
"NTriples",
"file",
"from",
"the",
"reader",
"pushing",
"statements",
"into",
"the",
"handler",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/NTriplesParser.java#L25-L28 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/comparators/Levenshtein.java | Levenshtein.distance | public static int distance(String s1, String s2) {
if (s1.length() == 0)
return s2.length();
if (s2.length() == 0)
return s1.length();
int s1len = s1.length();
// we use a flat array for better performance. we address it by
// s1ix + s1len * s2ix. this modification improves performance
... | java | public static int distance(String s1, String s2) {
if (s1.length() == 0)
return s2.length();
if (s2.length() == 0)
return s1.length();
int s1len = s1.length();
// we use a flat array for better performance. we address it by
// s1ix + s1len * s2ix. this modification improves performance
... | [
"public",
"static",
"int",
"distance",
"(",
"String",
"s1",
",",
"String",
"s2",
")",
"{",
"if",
"(",
"s1",
".",
"length",
"(",
")",
"==",
"0",
")",
"return",
"s2",
".",
"length",
"(",
")",
";",
"if",
"(",
"s2",
".",
"length",
"(",
")",
"==",
... | This is the original, naive implementation, using the Wagner &
Fischer algorithm from 1974. It uses a flattened matrix for
speed, but still computes the entire matrix. | [
"This",
"is",
"the",
"original",
"naive",
"implementation",
"using",
"the",
"Wagner",
"&",
"Fischer",
"algorithm",
"from",
"1974",
".",
"It",
"uses",
"a",
"flattened",
"matrix",
"for",
"speed",
"but",
"still",
"computes",
"the",
"entire",
"matrix",
"."
] | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/comparators/Levenshtein.java#L53-L94 | train |
larsga/Duke | duke-core/src/main/java/no/priv/garshol/duke/comparators/Levenshtein.java | Levenshtein.compactDistance | public static int compactDistance(String s1, String s2) {
if (s1.length() == 0)
return s2.length();
if (s2.length() == 0)
return s1.length();
// the maximum edit distance there is any point in reporting.
int maxdist = Math.min(s1.length(), s2.length()) / 2;
// we allocate just one ... | java | public static int compactDistance(String s1, String s2) {
if (s1.length() == 0)
return s2.length();
if (s2.length() == 0)
return s1.length();
// the maximum edit distance there is any point in reporting.
int maxdist = Math.min(s1.length(), s2.length()) / 2;
// we allocate just one ... | [
"public",
"static",
"int",
"compactDistance",
"(",
"String",
"s1",
",",
"String",
"s2",
")",
"{",
"if",
"(",
"s1",
".",
"length",
"(",
")",
"==",
"0",
")",
"return",
"s2",
".",
"length",
"(",
")",
";",
"if",
"(",
"s2",
".",
"length",
"(",
")",
... | Optimized version of the Wagner & Fischer algorithm that only
keeps a single column in the matrix in memory at a time. It
implements the simple cutoff, but otherwise computes the entire
matrix. It is roughly twice as fast as the original function. | [
"Optimized",
"version",
"of",
"the",
"Wagner",
"&",
"Fischer",
"algorithm",
"that",
"only",
"keeps",
"a",
"single",
"column",
"in",
"the",
"matrix",
"in",
"memory",
"at",
"a",
"time",
".",
"It",
"implements",
"the",
"simple",
"cutoff",
"but",
"otherwise",
... | 6263f9c6e984c26362a76241c7c7ea3bb4469bac | https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/comparators/Levenshtein.java#L228-L288 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.