Java Code Examples for java.time.temporal.ChronoUnit#MILLENNIA

The following examples show how to use java.time.temporal.ChronoUnit#MILLENNIA . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TCKDuration.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] provider_factory_of_badTemporalUnit() {
    return new Object[][] {
        {0, MICROS},
        {0, MILLIS},
        {0, MINUTES},
        {0, HOURS},
        {0, HALF_DAYS},
        {0, DAYS},
        {0, ChronoUnit.MONTHS},
        {0, ChronoUnit.YEARS},
        {0, ChronoUnit.DECADES},
        {0, ChronoUnit.CENTURIES},
        {0, ChronoUnit.MILLENNIA},
    };
}
 
Example 2
Source File: TCKDuration.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] provider_factory_of_badTemporalUnit() {
    return new Object[][] {
        {0, MICROS},
        {0, MILLIS},
        {0, MINUTES},
        {0, HOURS},
        {0, HALF_DAYS},
        {0, DAYS},
        {0, ChronoUnit.MONTHS},
        {0, ChronoUnit.YEARS},
        {0, ChronoUnit.DECADES},
        {0, ChronoUnit.CENTURIES},
        {0, ChronoUnit.MILLENNIA},
    };
}
 
Example 3
Source File: TCKDuration.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] provider_factory_of_badTemporalUnit() {
    return new Object[][] {
        {0, MICROS},
        {0, MILLIS},
        {0, MINUTES},
        {0, HOURS},
        {0, HALF_DAYS},
        {0, DAYS},
        {0, ChronoUnit.MONTHS},
        {0, ChronoUnit.YEARS},
        {0, ChronoUnit.DECADES},
        {0, ChronoUnit.CENTURIES},
        {0, ChronoUnit.MILLENNIA},
    };
}
 
Example 4
Source File: TCKDuration.java    From j2objc with Apache License 2.0 6 votes vote down vote up
@DataProvider
public static Object[][] provider_factory_of_badTemporalUnit() {
    return new Object[][] {
        {0, MICROS},
        {0, MILLIS},
        {0, MINUTES},
        {0, HOURS},
        {0, HALF_DAYS},
        {0, DAYS},
        {0, ChronoUnit.MONTHS},
        {0, ChronoUnit.YEARS},
        {0, ChronoUnit.DECADES},
        {0, ChronoUnit.CENTURIES},
        {0, ChronoUnit.MILLENNIA},
    };
}
 
Example 5
Source File: TCKDuration.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] provider_factory_of_badTemporalUnit() {
    return new Object[][] {
        {0, MICROS},
        {0, MILLIS},
        {0, MINUTES},
        {0, HOURS},
        {0, HALF_DAYS},
        {0, DAYS},
        {0, ChronoUnit.MONTHS},
        {0, ChronoUnit.YEARS},
        {0, ChronoUnit.DECADES},
        {0, ChronoUnit.CENTURIES},
        {0, ChronoUnit.MILLENNIA},
    };
}
 
Example 6
Source File: TCKDuration.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] provider_factory_of_badTemporalUnit() {
    return new Object[][] {
        {0, MICROS},
        {0, MILLIS},
        {0, MINUTES},
        {0, HOURS},
        {0, HALF_DAYS},
        {0, DAYS},
        {0, ChronoUnit.MONTHS},
        {0, ChronoUnit.YEARS},
        {0, ChronoUnit.DECADES},
        {0, ChronoUnit.CENTURIES},
        {0, ChronoUnit.MILLENNIA},
    };
}
 
Example 7
Source File: TCKDuration.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] provider_factory_of_badTemporalUnit() {
    return new Object[][] {
        {0, MICROS},
        {0, MILLIS},
        {0, MINUTES},
        {0, HOURS},
        {0, HALF_DAYS},
        {0, DAYS},
        {0, ChronoUnit.MONTHS},
        {0, ChronoUnit.YEARS},
        {0, ChronoUnit.DECADES},
        {0, ChronoUnit.CENTURIES},
        {0, ChronoUnit.MILLENNIA},
    };
}
 
Example 8
Source File: TCKDuration.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] provider_factory_of_badTemporalUnit() {
    return new Object[][] {
        {0, MICROS},
        {0, MILLIS},
        {0, MINUTES},
        {0, HOURS},
        {0, HALF_DAYS},
        {0, DAYS},
        {0, ChronoUnit.MONTHS},
        {0, ChronoUnit.YEARS},
        {0, ChronoUnit.DECADES},
        {0, ChronoUnit.CENTURIES},
        {0, ChronoUnit.MILLENNIA},
    };
}
 
Example 9
Source File: TCKDuration.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] provider_factory_of_badTemporalUnit() {
    return new Object[][] {
        {0, MICROS},
        {0, MILLIS},
        {0, MINUTES},
        {0, HOURS},
        {0, HALF_DAYS},
        {0, DAYS},
        {0, ChronoUnit.MONTHS},
        {0, ChronoUnit.YEARS},
        {0, ChronoUnit.DECADES},
        {0, ChronoUnit.CENTURIES},
        {0, ChronoUnit.MILLENNIA},
    };
}
 
Example 10
Source File: TCKPeriod.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] data_badTemporalUnit() {
    return new Object[][] {
        {ChronoUnit.MICROS},
        {ChronoUnit.MILLIS},
        {ChronoUnit.HALF_DAYS},
        {ChronoUnit.DECADES},
        {ChronoUnit.CENTURIES},
        {ChronoUnit.MILLENNIA},
    };
}
 
Example 11
Source File: TCKPeriod.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] data_badTemporalUnit() {
    return new Object[][] {
        {ChronoUnit.MICROS},
        {ChronoUnit.MILLIS},
        {ChronoUnit.HALF_DAYS},
        {ChronoUnit.DECADES},
        {ChronoUnit.CENTURIES},
        {ChronoUnit.MILLENNIA},
    };
}
 
Example 12
Source File: TCKPeriod.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] data_badTemporalUnit() {
    return new Object[][] {
        {ChronoUnit.MICROS},
        {ChronoUnit.MILLIS},
        {ChronoUnit.HALF_DAYS},
        {ChronoUnit.DECADES},
        {ChronoUnit.CENTURIES},
        {ChronoUnit.MILLENNIA},
    };
}
 
Example 13
Source File: TCKPeriod.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] data_badTemporalUnit() {
    return new Object[][] {
        {ChronoUnit.MICROS},
        {ChronoUnit.MILLIS},
        {ChronoUnit.HALF_DAYS},
        {ChronoUnit.DECADES},
        {ChronoUnit.CENTURIES},
        {ChronoUnit.MILLENNIA},
    };
}
 
Example 14
Source File: TCKPeriod.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] data_badTemporalUnit() {
    return new Object[][] {
        {ChronoUnit.MICROS},
        {ChronoUnit.MILLIS},
        {ChronoUnit.HALF_DAYS},
        {ChronoUnit.DECADES},
        {ChronoUnit.CENTURIES},
        {ChronoUnit.MILLENNIA},
    };
}
 
Example 15
Source File: TCKPeriod.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] data_badTemporalUnit() {
    return new Object[][] {
        {ChronoUnit.MICROS},
        {ChronoUnit.MILLIS},
        {ChronoUnit.HALF_DAYS},
        {ChronoUnit.DECADES},
        {ChronoUnit.CENTURIES},
        {ChronoUnit.MILLENNIA},
    };
}
 
Example 16
Source File: TCKPeriod.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] data_badTemporalUnit() {
    return new Object[][] {
        {ChronoUnit.MICROS},
        {ChronoUnit.MILLIS},
        {ChronoUnit.HALF_DAYS},
        {ChronoUnit.DECADES},
        {ChronoUnit.CENTURIES},
        {ChronoUnit.MILLENNIA},
    };
}
 
Example 17
Source File: TCKPeriod.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] data_badTemporalUnit() {
    return new Object[][] {
        {ChronoUnit.MICROS},
        {ChronoUnit.MILLIS},
        {ChronoUnit.HALF_DAYS},
        {ChronoUnit.DECADES},
        {ChronoUnit.CENTURIES},
        {ChronoUnit.MILLENNIA},
    };
}
 
Example 18
Source File: TCKPeriod.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@DataProvider(name="BadTemporalUnit")
Object[][] data_badTemporalUnit() {
    return new Object[][] {
        {ChronoUnit.MICROS},
        {ChronoUnit.MILLIS},
        {ChronoUnit.HALF_DAYS},
        {ChronoUnit.DECADES},
        {ChronoUnit.CENTURIES},
        {ChronoUnit.MILLENNIA},
    };
}
 
Example 19
Source File: ArchiveEventEncoderTest.java    From aeron with Apache License 2.0 5 votes vote down vote up
@Test
void testSessionStateChangeLength()
{
    final ChronoUnit from = ChronoUnit.ERAS;
    final ChronoUnit to = ChronoUnit.MILLENNIA;
    final String payload = from.name() + STATE_SEPARATOR + to.name();

    assertEquals(payload.length() + SIZE_OF_LONG + SIZE_OF_INT, sessionStateChangeLength(from, to));
}
 
Example 20
Source File: TimeIntervalTest.java    From influxdb-client-java with MIT License 3 votes vote down vote up
@Test
void millennia() {

    TimeInterval interval = new TimeInterval(14L, ChronoUnit.MILLENNIA);

    Assertions.assertThat(interval.toString()).isEqualTo("14000y");
}