Searched refs:from (Results 1 - 25 of 133) sorted by relevance

123456

/libcore/ojluni/src/test/java/time/test/java/time/format/
H A DTestDateTimeFormatter.java45 * may be used to endorse or promote products derived from this software
112 assertGoodErrorDate(DayOfWeek::from, "DayOfWeek");
113 assertGoodErrorDate(Month::from, "Month");
114 assertGoodErrorDate(YearMonth::from, "YearMonth");
115 assertGoodErrorDate(MonthDay::from, "MonthDay");
116 assertGoodErrorDate(LocalDate::from, "LocalDate");
117 assertGoodErrorDate(LocalTime::from, "LocalTime");
118 assertGoodErrorDate(LocalDateTime::from, "LocalDateTime");
119 assertGoodErrorDate(OffsetTime::from, "OffsetTime");
120 assertGoodErrorDate(OffsetDateTime::from, "OffsetDateTim
[all...]
H A DTestDateTimeParsing.java45 * may be used to endorse or promote products derived from this software
139 assertEquals(ZonedDateTime.from(actual), expected);
145 assertEquals(LocalDateTime.from(actual), expected.toLocalDateTime());
151 assertEquals(Instant.from(actual), expected.toInstant());
178 ZonedDateTime.from(actual);
184 LocalDateTime.from(actual);
190 assertEquals(Instant.from(actual), expected);
/libcore/ojluni/src/main/java/java/util/stream/
H A DNode.java113 * @param from The (inclusive) starting offset of elements to include, must
121 default Node<T> truncate(long from, long to, IntFunction<T[]> generator) { argument
122 if (from == 0 && to == count())
125 long size = to - from;
128 for (int i = 0; i < from && spliterator.tryAdvance(e -> { }); i++) { }
253 T_NODE truncate(long from, long to, IntFunction<T[]> generator); argument
340 * obtain an int[] array then and copies the elements from that int[]
356 default Node.OfInt truncate(long from, long to, IntFunction<Integer[]> generator) { argument
357 if (from == 0 && to == count())
359 long size = to - from;
429 truncate(long from, long to, IntFunction<Long[]> generator) argument
504 truncate(long from, long to, IntFunction<Double[]> generator) argument
[all...]
H A DStreams.java64 // All elements are traversed if from == upTo & last == 0
65 private int from; field in class:Streams.RangeIntSpliterator
72 RangeIntSpliterator(int from, int upTo, boolean closed) { argument
73 this(from, upTo, closed ? 1 : 0);
76 private RangeIntSpliterator(int from, int upTo, int last) { argument
77 this.from = from;
86 final int i = from;
88 from++;
104 int i = from;
189 private long from; field in class:Streams.RangeLongSpliterator
196 RangeLongSpliterator(long from, long upTo, boolean closed) argument
200 RangeLongSpliterator(long from, long upTo, int last) argument
[all...]
/libcore/ojluni/src/test/java/nio/file/attribute/
H A DFileTimeTest.java28 // Android-changed: Adapted from
41 // Android-changed: Renamed from "Basic"
127 FileTime ft = FileTime.from(value, unit);
136 FileTime ft = FileTime.from(value, unit);
144 ft = FileTime.from(value, unit);
153 // from(Instant)
159 FileTime ft = FileTime.from(instant);
161 throw new RuntimeException("from(Instant) failed");
165 ft = FileTime.from(instant);
168 throw new RuntimeException("from(Instan
[all...]
H A DBasicFileAttributeViewCreationTimeTest.java30 // Android-changed: Adapted from
43 // Android-changed: Renamed from "CreationTime"
102 Files.setLastModifiedTime(file, FileTime.from(plusHour));
115 creationTime = FileTime.from(minusHour);
/libcore/luni/src/main/java/libcore/util/
H A DNonNull.java38 int from() default Integer.MIN_VALUE;
H A DNullFromTypeParam.java37 int from() default Integer.MIN_VALUE;
H A DNullable.java38 int from() default Integer.MIN_VALUE;
/libcore/tools/upstream/src/main/java/libcore/
H A DCopyUpstreamFiles.java65 private void copyFile(Path from, Path to) throws IOException { argument
66 if (!from.toFile().canRead()) {
67 throw new IOException("Error reading " + from);
76 Files.copy(from, to);
/libcore/luni/src/test/java/libcore/java/util/
H A DDateTest.java98 assertEquals(new Date(millis), Date.from(Instant.ofEpochMilli(millis)));
119 Date.from(Instant.ofEpochSecond(minSecond));
122 Date.from(Instant.ofEpochSecond(minSecond - 1, 192000000));
128 Date.from(Instant.ofEpochSecond(maxSecond, 0));
131 Date.from(Instant.ofEpochSecond(maxSecond, 807999999));
138 Date.from(instant);
167 assertEquals(date, Date.from(instant));
/libcore/ojluni/src/main/java/java/lang/invoke/
H A DTransformers.java253 // Read the array object and the index from the stack frame.
282 // Read the array object, index and the value to write from the stack frame.
706 private static void throwWrongMethodTypeException(MethodType from, MethodType to) { argument
707 throw new WrongMethodTypeException("Cannot convert " + from + " to " + to);
956 // Copy parameters from |callerFrame| to |targetFrame| leaving room for arity array.
984 // Copy types from caller types to new methodType.
1060 * Range of arguments to copy verbatim from the input frame, This will cover all
1325 * Range of arguments to copy verbatim from the input frame, This will cover all
1362 // array we construct might differ from the type of the reference we read
1363 // from th
1860 readPrimitiveAsByte(final StackFrameReader reader, final Class<?> from) argument
1882 readPrimitiveAsChar(final StackFrameReader reader, final Class<?> from) argument
1904 readPrimitiveAsShort(final StackFrameReader reader, final Class<?> from) argument
1926 readPrimitiveAsInt(final StackFrameReader reader, final Class<?> from) argument
1948 readPrimitiveAsLong(final StackFrameReader reader, final Class<?> from) argument
1970 readPrimitiveAsFloat(final StackFrameReader reader, final Class<?> from) argument
1992 readPrimitiveAsDouble(final StackFrameReader reader, final Class<?> from) argument
2014 explicitCastToBoolean(final StackFrameReader reader, final Class<?> from, final StackFrameWriter writer) argument
2021 explicitCastPrimitives(final StackFrameReader reader, final Class<?> from, final StackFrameWriter writer, final Class<?> to) argument
2073 unboxNonNull(final Object ref, final Class<?> from, final StackFrameWriter writer, final Class<?> to) argument
2104 unbox(final Object ref, final Class<?> from, final StackFrameWriter writer, final Class<?> to) argument
2113 box(final StackFrameReader reader, final Class<?> from, final StackFrameWriter writer, final Class<?> to) argument
2138 explicitCast(final StackFrameReader reader, final Class<?> from, final StackFrameWriter writer, final Class<?> to) argument
[all...]
/libcore/ojluni/src/main/java/sun/reflect/misc/
H A DReflectUtil.java125 * access from a class loader 'from' to classes or members in
127 * if 'from' is not the same as or an ancestor of 'to'. All code
129 * method returns false if 'from' class loader is a class loader
134 public static boolean needsPackageAccessCheck(ClassLoader from, ClassLoader to) { argument
135 if (from == null || from == to)
141 return !isAncestor(from, to);
164 * {@code SecurityException} if it accesses a restricted package from
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
H A DTCKTestServiceLoader.java44 * may be used to endorse or promote products derived from this software
80 LocalDate ld = LocalDate.from(copticDate);
/libcore/luni/src/test/java/libcore/java/time/chrono/
H A DMinguoChronologyTest.java84 MinguoDate.from(LocalDate.of(2000, 2, 1)), //February of a leap year
85 MinguoDate.from(LocalDate.of(2001, 2, 1)), //February of a non-leap year
93 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_MONTH),
95 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_YEAR),
97 assertEquals(LocalDate.from(date).range(ChronoField.ALIGNED_WEEK_OF_MONTH),
H A DThaiBuddhistChronologyTest.java86 ThaiBuddhistDate.from(LocalDate.of(2000, 2, 1)), //February of a leap year
87 ThaiBuddhistDate.from(LocalDate.of(2001, 2, 1)), //February of a non-leap year
95 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_MONTH),
97 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_YEAR),
99 assertEquals(LocalDate.from(date).range(ChronoField.ALIGNED_WEEK_OF_MONTH),
H A DJapaneseChronologyTest.java72 assertEquals(JapaneseEra.MEIJI, JapaneseDate.from(LocalDate.of(1873, 1, 1)).getEra());
73 assertEquals(JapaneseEra.TAISHO, JapaneseDate.from(LocalDate.of(1913, 1, 1)).getEra());
74 assertEquals(JapaneseEra.SHOWA, JapaneseDate.from(LocalDate.of(1927, 1, 1)).getEra());
75 assertEquals(JapaneseEra.HEISEI, JapaneseDate.from(LocalDate.of(1990, 1, 1)).getEra());
/libcore/ojluni/src/main/java/java/time/
H A DMonth.java47 * may be used to endorse or promote products derived from this software
91 * from 1 (January) to 12 (December). It is recommended that applications use the enum
175 * Obtains an instance of {@code Month} from an {@code int} value.
178 * This factory allows the enum to be obtained from the {@code int} value.
179 * The {@code int} value follows the ISO-8601 standard, from 1 (January) to 12 (December).
181 * @param month the month-of-year to represent, from 1 (January) to 12 (December)
194 * Obtains an instance of {@code Month} from a temporal object.
205 * allowing it to be used as a query via method reference, {@code Month::from}.
211 public static Month from(TemporalAccessor temporal) { method in class:Month
216 if (IsoChronology.INSTANCE.equals(Chronology.from(tempora
[all...]
H A DMonthDay.java47 * may be used to endorse or promote products derived from this software
94 * of a month and day-of-month. Any field that can be derived from a month and day,
149 * Obtains the current month-day from the system clock in the default time-zone.
164 * Obtains the current month-day from the system clock in the specified time-zone.
180 * Obtains the current month-day from the specified clock.
206 * @param dayOfMonth the day-of-month to represent, from 1 to 31
231 * @param month the month-of-year to represent, from 1 (January) to 12 (December)
232 * @param dayOfMonth the day-of-month to represent, from 1 to 31
243 * Obtains an instance of {@code MonthDay} from a temporal object.
255 * allowing it to be used as a query via method reference, {@code MonthDay::from}
261 public static MonthDay from(TemporalAccessor temporal) { method in class:MonthDay
[all...]
/libcore/ojluni/src/main/java/java/util/zip/
H A DZipUtils.java41 return FileTime.from(wtime / 10 + WINDOWS_EPOCH_IN_MICROSECONDS,
56 return FileTime.from(utime, TimeUnit.SECONDS);
126 * Fetches unsigned 16-bit value from byte array at specified offset.
134 * Fetches unsigned 32-bit value from byte array at specified offset.
142 * Fetches signed 64-bit value from byte array at specified offset.
/libcore/ojluni/src/main/java/java/time/zone/
H A DIcuZoneRulesProvider.java46 * A ZoneRulesProvider that generates rules from ICU4J TimeZones.
135 TimeZoneRule from = transition.getFrom();
138 if (from.getRawOffset() != to.getRawOffset()) {
141 millisToOffset(from.getRawOffset()),
145 int fromTotalOffset = from.getRawOffset() + from.getDSTSavings();
159 preLastDstSavings = from.getDSTSavings();
/libcore/ojluni/src/main/java/java/util/
H A DEnumSet.java31 * the elements in an enum set must come from a single enum type that is
136 * Adds all of the elements from the appropriate enum type to this enum
146 * @param s the enum set from which to initialize this enum set
155 * Creates an enum set initialized from the specified collection. If
162 * @param c the collection from which to initialize this enum set
163 * @return An enum set initialized from the given collection.
189 * @param s the enum set from whose complement to initialize this enum set
351 * @param from the first element in the range
353 * @throws NullPointerException if {@code from} or {@code to} are null
354 * @throws IllegalArgumentException if {@code from
358 range(E from, E to) argument
370 addRange(E from, E to) argument
[all...]
H A DJumboEnumSet.java54 void addRange(E from, E to) { argument
55 int fromIndex = from.ordinal() >>> 6;
59 elements[fromIndex] = (-1L >>> (from.ordinal() - to.ordinal() - 1))
60 << from.ordinal();
62 elements[fromIndex] = (-1L << from.ordinal());
67 size = to.ordinal() - from.ordinal() + 1;
216 * Removes the specified element from this set if it is present.
218 * @param e element to be removed from this set, if present
290 * Removes from this set all of its elements that are contained in
293 * @param c elements to be removed from thi
[all...]
/libcore/ojluni/src/test/java/time/tck/java/time/format/
H A DTCKDateTimeFormatter.java45 * may be used to endorse or promote products derived from this software
180 base.parse("2012-6-30-321", LocalDate::from); // wrong day-of-year
185 LocalDate parsed = f.parse("2012-6-30-321", LocalDate::from); // ignored day-of-year
199 base.parse("2012-6-30-321", LocalDate::from); // wrong month/day-of-month
204 LocalDate parsed = f.parse("2012-6-30-321", LocalDate::from); // ignored month/day-of-month
215 base.parse("2012-321-1", LocalDate::from); // wrong day-of-week
220 LocalDate parsed = f.parse("2012-321-1", LocalDate::from); // ignored wrong day-of-week
472 assertEquals(result.query(LocalDate::from), LocalDate.of(2012, 6, 30));
510 assertEquals(result.query(LocalDate::from), LocalDate.of(2012, 6, 30));
549 LocalDate result = DATE_FORMATTER.parse("ONE2012 07 27", LocalDate::from);
[all...]
H A DTCKInstantPrinterParser.java45 * may be used to endorse or promote products derived from this software
228 assertEquals(f.parse(input, Instant::from), expected);
238 assertEquals(f.parse(input, Instant::from), expected);
243 f.parse(input, Instant::from);
257 assertEquals(parsed.query(Instant::from), expected);
269 assertEquals(parsed.query(Instant::from), expected);

Completed in 502 milliseconds

123456