/libcore/ojluni/src/main/java/java/time/temporal/ |
H A D | TemporalAccessor.java | 84 * These can be accessed via {@linkplain #query(TemporalQuery) queries} using 164 * @param field the field to query the range for, not null 260 * This queries this date-time using the specified query strategy object. 265 * Examples might be a query that checks if the date is the day before February 29th 268 * The most common query implementations are method references, such as 275 * if (query == TemporalQueries.zoneId() || 276 * query == TemporalQueries.chronology() || query == TemporalQueries.precision()) { 279 * return query.queryFrom(this); 284 * {@code TemporalAccessor.super.query(quer 308 query(TemporalQuery<R> query) argument [all...] |
H A D | TemporalQueries.java | 85 * Examples might be a query that checks if the date is the day before February 29th 94 * The second is to use {@link TemporalAccessor#query(TemporalQuery)}: 98 * temporal = temporal.query(thisQuery); 100 * It is recommended to use the second approach, {@code query(TemporalQuery)}, 136 * A strict query for the {@code ZoneId}. 144 * In most cases, applications should use {@link #zone()} as this query is too strict. 165 * @return a query that can obtain the zone ID of a temporal, not null 172 * A query for the {@code Chronology}. 201 * That method is equivalent to this query, except that it throws an 204 * @return a query tha [all...] |
/libcore/luni/src/test/java/libcore/java/sql/ |
H A D | OldPreparedStatementTest.java | 181 String query = "insert into zoo(id, family, name) values(?, ?, 'unknown animal')"; 182 ps = conn.prepareStatement(query); 200 String query = "update zoo set name='Masha', family=? where id=?;"; 201 ps = conn.prepareStatement(query); 221 String query = "create table hutch (id integer not null, animal_id integer, address char(20), primary key (id));"; 222 ps = conn.prepareStatement(query); 233 String query = "select name, family from zoo where id = ?"; 234 ps = conn.prepareStatement(query); 245 String query = "select name, family from zoo where id = ?"; 246 ps = conn.prepareStatement(query); [all...] |
/libcore/luni/src/test/java/libcore/java/time/format/ |
H A D | DateTimeFormatterBuilderTest.java | 79 formatter.parse("Europe/London").query(TemporalQueries.zoneId())); 81 formatter.parse("UTC").query(TemporalQueries.zoneId())); 83 formatter.parse("GMT+01:00").query(TemporalQueries.zoneId())); 87 formatter.parse("UTC+01:00").query(TemporalQueries.zoneId())); 90 formatter.parse("+01:00").query(TemporalQueries.zoneId()));
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
H A D | Era.java | 132 * If the field is a {@link ChronoField} then the query is implemented here. 160 * If the field is a {@link ChronoField} then the query is implemented here. 172 * @param field the field to query the range for, not null 190 * If the field is a {@link ChronoField} then the query is implemented here. 222 * If the field is a {@link ChronoField} then the query is implemented here. 249 * Queries this era using the specified query. 251 * This queries this era using the specified query strategy object. 253 * obtain the result. Read the documentation of the query to understand 258 * specified query passing {@code this} as the argument. 261 * @param query th 268 query(TemporalQuery<R> query) argument [all...] |
H A D | ChronoLocalDate.java | 277 * allowing it to be used as a query via method reference, {@code ChronoLocalDate::from}. 289 Chronology chrono = temporal.query(TemporalQueries.chronology()); 488 * Queries this date using the specified query. 490 * This queries this date using the specified query strategy object. 492 * obtain the result. Read the documentation of the query to understand 497 * specified query passing {@code this} as the argument. 500 * @param query the query to invoke, not null 501 * @return the query result, null may be returned (defined by the query) 507 query(TemporalQuery<R> query) argument [all...] |
H A D | ChronoLocalDateTime.java | 157 * allowing it to be used as a query via method reference, {@code ChronoLocalDateTime::from}. 169 Chronology chrono = temporal.query(TemporalQueries.chronology()); 317 * Queries this date-time using the specified query. 319 * This queries this date-time using the specified query strategy object. 321 * obtain the result. Read the documentation of the query to understand 326 * specified query passing {@code this} as the argument. 329 * @param query the query to invoke, not null 330 * @return the query result, null may be returned (defined by the query) 336 query(TemporalQuery<R> query) argument [all...] |
H A D | ChronoZonedDateTime.java | 158 * allowing it to be used as a query via method reference, {@code ChronoZonedDateTime::from}. 170 Chronology chrono = temporal.query(TemporalQueries.chronology()); 464 * Queries this date-time using the specified query. 466 * This queries this date-time using the specified query strategy object. 468 * obtain the result. Read the documentation of the query to understand 473 * specified query passing {@code this} as the argument. 476 * @param query the query to invoke, not null 477 * @return the query result, null may be returned (defined by the query) 483 query(TemporalQuery<R> query) argument [all...] |
H A D | Chronology.java | 171 * allowing it to be used as a query via method reference, {@code Chronology::from}. 179 Chronology obj = temporal.query(TemporalQueries.chronology()); 373 * This will query the {@link Clock#systemDefaultZone() system clock} in the default 392 * This will query the {@link Clock#system(ZoneId) system clock} to obtain the current date. 412 * This will query the specified clock to obtain the current date - today. 440 * allowing it to be used as a query via method reference, {@code aChronology::date}. 463 * allowing it to be used as a query via method reference, {@code aChronology::localDateTime}. 495 * allowing it to be used as a query via method reference, {@code aChronology::zonedDateTime}. 645 public <R> R query(TemporalQuery<R> query) { [all...] |
/libcore/ojluni/src/main/java/java/time/format/ |
H A D | DateTimePrintContext.java | 132 Chronology temporalChrono = temporal.query(TemporalQueries.chronology()); 133 ZoneId temporalZone = temporal.query(TemporalQueries.zoneId()); 209 public <R> R query(TemporalQuery<R> query) { 210 if (query == TemporalQueries.chronology()) { 213 if (query == TemporalQueries.zoneId()) { 216 if (query == TemporalQueries.precision()) { 217 return temporal.query(query); 219 return query 279 getValue(TemporalQuery<R> query) argument [all...] |
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
H A D | TCKDateTimeParseResolver.java | 157 assertEquals(accessor.query(TemporalQueries.localDate()), null); 158 assertEquals(accessor.query(TemporalQueries.localTime()), null); 196 assertEquals(accessor.query(TemporalQueries.localDate()), null); 197 assertEquals(accessor.query(TemporalQueries.localTime()), null); 228 assertEquals(accessor.query(TemporalQueries.localDate()), null); 229 assertEquals(accessor.query(TemporalQueries.localTime()), null); 262 assertEquals(accessor.query(TemporalQueries.localDate()), null); 263 assertEquals(accessor.query(TemporalQueries.localTime()), null); 288 assertEquals(accessor.query(TemporalQueries.localDate()), expectedDate); 289 assertEquals(accessor.query(TemporalQuerie [all...] |
H A D | TCKZoneIdPrinterParser.java | 217 assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + text); 218 assertEquals(parsed.query(TemporalQueries.offset()), null, "Incorrect offset parsing: " + text); 219 assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + text); 234 assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + prefixText); 235 assertEquals(parsed.query(TemporalQueries.offset()), null, "Incorrect offset parsing: " + prefixText); 236 assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + prefixText); 250 assertEquals(parsed.query(TemporalQueries.zoneId()), expected, "Incorrect zoneId parsing: " + suffixText); 251 assertEquals(parsed.query(TemporalQueries.offset()), null, "Incorrect offset parsing: " + suffixText); 252 assertEquals(parsed.query(TemporalQueries.zone()), expected, "Incorrect zone parsing: " + suffixText); 272 assertEquals(parsed.query(TemporalQuerie [all...] |
H A D | TCKInstantPrinterParser.java | 229 assertEquals(f.parse(input).query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); 230 assertEquals(f.parse(input).query(DateTimeFormatter.parsedLeapSecond()), Boolean.FALSE); 239 assertEquals(f.parse(input).query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); 240 assertEquals(f.parse(input).query(DateTimeFormatter.parsedLeapSecond()), Boolean.FALSE); 257 assertEquals(parsed.query(Instant::from), expected); 258 assertEquals(parsed.query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); 259 assertEquals(parsed.query(DateTimeFormatter.parsedLeapSecond()), Boolean.FALSE); 269 assertEquals(parsed.query(Instant::from), expected); 270 assertEquals(parsed.query(DateTimeFormatter.parsedExcessDays()), Period.ZERO); 271 assertEquals(parsed.query(DateTimeFormatte [all...] |
/libcore/ojluni/src/main/java/java/time/ |
H A D | DayOfWeek.java | 181 * allowing it to be used as a query via method reference, {@code DayOfWeek::from}. 275 * @param field the field to query the range for, not null 387 * Queries this day-of-week using the specified query. 389 * This queries this day-of-week using the specified query strategy object. 391 * obtain the result. Read the documentation of the query to understand 396 * specified query passing {@code this} as the argument. 399 * @param query the query to invoke, not null 400 * @return the query result, null may be returned (defined by the query) 406 query(TemporalQuery<R> query) argument [all...] |
H A D | Month.java | 205 * allowing it to be used as a query via method reference, {@code Month::from}. 302 * @param field the field to query the range for, not null 544 * Queries this month-of-year using the specified query. 546 * This queries this month-of-year using the specified query strategy object. 548 * obtain the result. Read the documentation of the query to understand 553 * specified query passing {@code this} as the argument. 556 * @param query the query to invoke, not null 557 * @return the query result, null may be returned (defined by the query) 563 query(TemporalQuery<R> query) argument [all...] |
H A D | ZoneId.java | 451 * allowing it to be used as a query via method reference, {@code ZoneId::from}. 458 ZoneId obj = temporal.query(TemporalQueries.zone()); 513 * The returned temporal has no supported fields, with the query method 530 public <R> R query(TemporalQuery<R> query) { 531 if (query == TemporalQueries.zoneId()) { 534 return TemporalAccessor.super.query(query);
|
H A D | Instant.java | 258 * This will query the {@link Clock#systemUTC() system UTC clock} to 273 * This will query the specified clock to obtain the current time. 355 * allowing it to be used as a query via method reference, {@code Instant::from}. 432 * If the field is a {@link ChronoField} then the query is implemented here. 465 * If the unit is a {@link ChronoUnit} then the query is implemented here. 504 * If the field is a {@link ChronoField} then the query is implemented here. 514 * @param field the field to query the range for, not null 532 * If the field is a {@link ChronoField} then the query is implemented here. 572 * If the field is a {@link ChronoField} then the query is implemented here. 1030 * Queries this instant using the specified query 1049 query(TemporalQuery<R> query) argument [all...] |
H A D | OffsetTime.java | 150 * This will query the {@link Clock#systemDefaultZone() system clock} in the default 166 * This will query the {@link Clock#system(ZoneId) system clock} to obtain the current time. 183 * This will query the specified clock to obtain the current time. 274 * allowing it to be used as a query via method reference, {@code OffsetTime::from}. 358 * If the field is a {@link ChronoField} then the query is implemented here. 403 * If the unit is a {@link ChronoUnit} then the query is implemented here. 441 * If the field is a {@link ChronoField} then the query is implemented here. 451 * @param field the field to query the range for, not null 475 * If the field is a {@link ChronoField} then the query is implemented here. 506 * If the field is a {@link ChronoField} then the query i 1072 query(TemporalQuery<R> query) argument [all...] |
H A D | ZoneOffset.java | 327 * The conversion uses the {@link TemporalQueries#offset()} query, which relies 331 * allowing it to be used as a query via method reference, {@code ZoneOffset::from}. 339 ZoneOffset offset = temporal.query(TemporalQueries.offset()); 510 * If the field is a {@link ChronoField} then the query is implemented here. 538 * If the field is a {@link ChronoField} then the query is implemented here. 548 * @param field the field to query the range for, not null 566 * If the field is a {@link ChronoField} then the query is implemented here. 600 * If the field is a {@link ChronoField} then the query is implemented here. 627 * Queries this offset using the specified query. 629 * This queries this offset using the specified query strateg 646 query(TemporalQuery<R> query) argument [all...] |
H A D | MonthDay.java | 106 * Related to this, {@code MonthDay} only provides access to query and set the fields 151 * This will query the {@link Clock#systemDefaultZone() system clock} in the default 166 * This will query the {@link Clock#system(ZoneId) system clock} to obtain the current month-day. 182 * This will query the specified clock to obtain the current month-day. 255 * allowing it to be used as a query via method reference, {@code MonthDay::from}. 326 * If the field is a {@link ChronoField} then the query is implemented here. 358 * If the field is a {@link ChronoField} then the query is implemented here. 368 * @param field the field to query the range for, not null 391 * If the field is a {@link ChronoField} then the query is implemented here. 421 * If the field is a {@link ChronoField} then the query i 586 query(TemporalQuery<R> query) argument [all...] |
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
H A D | TestCharLiteralParser.java | 114 assertEquals(parsed.query(TemporalQueries.chronology()), null); 115 assertEquals(parsed.query(TemporalQueries.zoneId()), null);
|
H A D | TestStringLiteralParser.java | 117 assertEquals(parsed.query(TemporalQueries.chronology()), null); 118 assertEquals(parsed.query(TemporalQueries.zoneId()), null);
|
/libcore/ojluni/src/main/java/java/net/ |
H A D | URL.java | 40 * such as a query to a database or to a search engine. More 175 * defined as {@code path[?query]} 181 * The query part of this URL. 183 private transient String query; field in class:URL 405 query = parts.getQuery(); 407 if (query != null) { 408 this.file = path + "?" + query; 446 * <scheme>://<authority><path>?<query>#<fragment> 448 * The reference is parsed into the scheme, authority, path, query and 450 * authority, and query component 705 set(String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref) argument 1319 String path, query, ref; field in class:Parts [all...] |
H A D | URLStreamHandler.java | 130 String query = u.getQuery(); 141 // FIX: should not assume query if opaque 142 // Strip off the query part 147 query = spec.substring(queryStart+1, limit); 258 query = null; 351 setURL(u, protocol, host, port, authority, userInfo, path, query, ref); 536 * @param query the query part for the URL. 545 String query, String ref) { 551 u.set(u.getProtocol(), host, port, authority, userInfo, path, query, re 543 setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref) argument [all...] |
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
H A D | TCKIsoChronology.java | 111 public <R> R query(TemporalQuery<R> query) { 112 if (query == TemporalQueries.chronology()) { 134 public <R> R query(TemporalQuery<R> query) { 135 if (query == TemporalQueries.chronology()) { 170 public <R> R query(TemporalQuery<R> query) { 171 if (query == TemporalQueries.localDate()) { 209 public <R> R query(TemporalQuer [all...] |