Home
last modified time | relevance | path

Searched refs:ordinal (Results 1 – 25 of 33) sorted by relevance

12

/libcore/luni/src/test/java/libcore/java/security/cert/
DCRLReasonTest.java25 assertEquals("UNSPECIFIED", 0, CRLReason.UNSPECIFIED.ordinal()); in testCryptoPrimitive_ordinal_ExpectedValues()
26 assertEquals("KEY_COMPROMISE", 1, CRLReason.KEY_COMPROMISE.ordinal()); in testCryptoPrimitive_ordinal_ExpectedValues()
27 assertEquals("CA_COMPROMISE", 2, CRLReason.CA_COMPROMISE.ordinal()); in testCryptoPrimitive_ordinal_ExpectedValues()
28 assertEquals("AFFILIATION_CHANGED", 3, CRLReason.AFFILIATION_CHANGED.ordinal()); in testCryptoPrimitive_ordinal_ExpectedValues()
29 assertEquals("SUPERSEDED", 4, CRLReason.SUPERSEDED.ordinal()); in testCryptoPrimitive_ordinal_ExpectedValues()
30 assertEquals("CESSATION_OF_OPERATION", 5, CRLReason.CESSATION_OF_OPERATION.ordinal()); in testCryptoPrimitive_ordinal_ExpectedValues()
31 assertEquals("CERTIFICATE_HOLD", 6, CRLReason.CERTIFICATE_HOLD.ordinal()); in testCryptoPrimitive_ordinal_ExpectedValues()
32 assertEquals("UNUSED", 7, CRLReason.UNUSED.ordinal()); in testCryptoPrimitive_ordinal_ExpectedValues()
33 assertEquals("REMOVE_FROM_CRL", 8, CRLReason.REMOVE_FROM_CRL.ordinal()); in testCryptoPrimitive_ordinal_ExpectedValues()
34 assertEquals("PRIVILEGE_WITHDRAWN", 9, CRLReason.PRIVILEGE_WITHDRAWN.ordinal()); in testCryptoPrimitive_ordinal_ExpectedValues()
[all …]
/libcore/ojluni/src/main/java/java/util/
DJumboEnumSet.java56 int fromIndex = from.ordinal() >>> 6; in addRange()
57 int toIndex = to.ordinal() >>> 6; in addRange()
60 elements[fromIndex] = (-1L >>> (from.ordinal() - to.ordinal() - 1)) in addRange()
61 << from.ordinal(); in addRange()
63 elements[fromIndex] = (-1L << from.ordinal()); in addRange()
66 elements[toIndex] = -1L >>> (63 - to.ordinal()); in addRange()
68 size = to.ordinal() - from.ordinal() + 1; in addRange()
188 int eOrdinal = ((Enum<?>)e).ordinal(); in contains()
205 int eOrdinal = e.ordinal(); in add()
228 int eOrdinal = ((Enum<?>)e).ordinal(); in remove()
DRegularEnumSet.java50 elements = (-1L >>> (from.ordinal() - to.ordinal() - 1)) << from.ordinal(); in addRange()
148 return (elements & (1L << ((Enum<?>)e).ordinal())) != 0; in contains()
165 elements |= (1L << ((Enum<?>)e).ordinal()); in add()
183 elements &= ~(1L << ((Enum<?>)e).ordinal()); in remove()
DEnumMap.java220 return isValidKey(key) && vals[((Enum<?>)key).ordinal()] != null; in containsKey()
225 maskNull(value).equals(vals[((Enum<?>)key).ordinal()]); in containsMapping()
245 unmaskNull(vals[((Enum<?>)key).ordinal()]) : null); in get()
267 int index = key.ordinal(); in put()
287 int index = ((Enum<?>)key).ordinal(); in remove()
298 int index = ((Enum<?>)key).ordinal(); in removeMapping()
/libcore/ojluni/src/main/java/java/lang/
DEnum.java113 private final int ordinal; field in Enum
126 public final int ordinal() { in ordinal() method in Enum
127 return ordinal; in ordinal()
141 protected Enum(String name, int ordinal) { in Enum() argument
143 this.ordinal = ordinal; in Enum()
205 return self.ordinal - other.ordinal; in compareTo()
/libcore/ojluni/src/main/java/java/time/format/
DTextStyle.java136 return (ordinal() & 1) == 1; in isStandalone()
144 return TextStyle.values()[ordinal() | 1]; in asStandalone()
153 return TextStyle.values()[ordinal() & ~1]; in asNormal()
DSignStyle.java126 switch (ordinal()) { in parse()
/libcore/ojluni/annotations/hiddenapi/java/lang/
DEnum.java35 protected Enum(java.lang.String name, int ordinal) { in Enum() argument
43 public final int ordinal() { in ordinal() method in Enum
107 private final int ordinal; field in Enum
110 ordinal = 0;
/libcore/ojluni/src/main/java/java/time/temporal/
DChronoField.java732 return ordinal() >= DAY_OF_WEEK.ordinal() && ordinal() <= ERA.ordinal(); in isDateBased()
744 return ordinal() < DAY_OF_WEEK.ordinal(); in isTimeBased()
DTemporalAdjusters.java346 public static TemporalAdjuster dayOfWeekInMonth(int ordinal, DayOfWeek dayOfWeek) { in dayOfWeekInMonth() argument
349 if (ordinal >= 0) { in dayOfWeekInMonth()
354 dowDiff += (ordinal - 1L) * 7L; // safe from overflow in dayOfWeekInMonth()
363 daysDiff -= (-ordinal - 1L) * 7L; // safe from overflow in dayOfWeekInMonth()
DIsoFields.java625 int dow0 = date.getDayOfWeek().ordinal(); in getWeek()
650 int dow = date.getDayOfWeek().ordinal(); in getWeekBasedYear()
655 int dow = date.getDayOfWeek().ordinal(); in getWeekBasedYear()
/libcore/ojluni/src/main/java/java/time/chrono/
DJapaneseEra.java218 return ERA_CONFIG[ordinal(eraValue)]; in getPrivateEra()
242 int i = ordinal(japaneseEra); in of()
356 private static int ordinal(int eraValue) { in ordinal() method in JapaneseEra
411 return ERA_CONFIG[ordinal(getValue())].getAbbreviation(); in getAbbreviation()
415 return ERA_CONFIG[ordinal(getValue())].getName(); in getName()
DIsoEra.java151 return ordinal(); in getValue()
DThaiBuddhistEra.java158 return ordinal(); in getValue()
DMinguoEra.java158 return ordinal(); in getValue()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKTemporalAdjusters.java339 for (int ordinal = 1; ordinal <= 5; ordinal++) { in test_dayOfWeekInMonth_positive()
342 … LocalDate test = (LocalDate) TemporalAdjusters.dayOfWeekInMonth(ordinal, dow).adjustInto(date); in test_dayOfWeekInMonth_positive()
343 assertEquals(test, expected.plusWeeks(ordinal - 1)); in test_dayOfWeekInMonth_positive()
395 for (int ordinal = 0; ordinal < 5; ordinal++) { in test_dayOfWeekInMonth_negative()
398 …LocalDate test = (LocalDate) TemporalAdjusters.dayOfWeekInMonth(-1 - ordinal, dow).adjustInto(date… in test_dayOfWeekInMonth_negative()
399 assertEquals(test, expected.minusWeeks(ordinal)); in test_dayOfWeekInMonth_negative()
/libcore/ojluni/annotations/sdk/nullability/java/lang/
DEnum.annotated.java34 protected Enum(@libcore.util.NonNull java.lang.String name, int ordinal) { throw new RuntimeExcepti… in Enum() argument
38 public final int ordinal() { throw new RuntimeException("Stub!"); } in ordinal() method in Enum
/libcore/ojluni/src/main/java/java/time/
DMonth.java236 return ordinal() + 1; in getValue()
394 return ENUMS[(ordinal() + (amount + 12)) % 12]; in plus()
539 return ENUMS[(ordinal() / 3) * 3]; in firstMonthOfQuarter()
DDayOfWeek.java209 return ordinal() + 1; in getValue()
367 return ENUMS[(ordinal() + (amount + 7)) % 7]; in plus()
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestNarrowMonthNamesAndDayNames.java89 int index = value.ordinal(); in compareMonthNarrowValues()
120 int index = value.ordinal(); in compareDayNarrowValues()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DEnumTest.java107 assertEquals(0, larry.ordinal()); in test_ordinal()
108 assertEquals(1, moe.ordinal()); in test_ordinal()
109 assertEquals(2, Sample.CURLY.ordinal()); in test_ordinal()
/libcore/ojluni/src/test/java/util/EnumSet/
DJumboRange.java48 Assert.assertEquals(range.size(), e1.ordinal() - e0.ordinal() + 1); in test()
/libcore/ojluni/src/main/java/java/time/zone/
DZoneOffsetTransitionRule.java319 (timeDefinition.ordinal() << 12) + // 2 bits in writeExternal()
542 (month.ordinal() << 11) + ((dom + 32) << 5) + in hashCode()
543 ((dow == null ? 7 : dow.ordinal()) << 2) + (timeDefinition.ordinal()); in hashCode()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DCopticEra.java119 return ordinal(); in getValue()
/libcore/ojluni/src/main/java/java/awt/font/
DNumericShaper.java315 int index = script.ordinal(); in toRangeIndex()
326 int index = range.ordinal(); in toRangeMask()

12