Example usage for java.util Locale ITALY

List of usage examples for java.util Locale ITALY

Introduction

In this page you can find the example usage for java.util Locale ITALY.

Prototype

Locale ITALY

To view the source code for java.util Locale ITALY.

Click Source Link

Document

Useful constant for country.

Usage

From source file:net.giovannicapuano.galax.util.PersistentCookieStore.java

protected String byteArrayToHexString(byte[] b) {
    StringBuilder sb = new StringBuilder(b.length * 2);
    for (byte element : b) {
        int v = element & 0xff;
        if (v < 16) {
            sb.append('0');
        }// w ww  .j  a v a2  s .  com
        sb.append(Integer.toHexString(v));
    }
    return sb.toString().toUpperCase(Locale.ITALY);
}

From source file:org.neo4art.importer.wikipedia.core.listener.WikipediaCVSImportBatchImporterListener.java

/**
 * @see org.neo4art.importer.wikipedia.core.listener.WikipediaAbstractImporterListener#flush()
 */// w ww  . j  ava2 s.c  o m
@Override
public void flush() {

    long pages = pageCount.get();

    logger.info(NumberFormat.getInstance(Locale.ITALY).format(pages)
            + " wikipedia pages parsed from dump so far...");

    this.firstRound = false;

    this.pageCount = new AtomicLong();
}

From source file:hk.idv.kenson.jrconsole.Console.java

/**
 * //from w w  w . j  av a 2 s  . co m
 * @param localeString
 * @return
 */
private static Locale getLocale(String localeString) {
    if ("default".equals(localeString))
        return Locale.getDefault();
    if ("canada".equals(localeString))
        return Locale.CANADA;
    if ("canada_french".equals(localeString))
        return Locale.CANADA_FRENCH;
    if ("china".equals(localeString))
        return Locale.CHINA;
    if ("chinese".equals(localeString))
        return Locale.CHINESE;
    if ("english".equals(localeString))
        return Locale.ENGLISH;
    if ("franch".equals(localeString))
        return Locale.FRANCE;
    if ("german".equals(localeString))
        return Locale.GERMAN;
    if ("germany".equals(localeString))
        return Locale.GERMANY;
    if ("italian".equals(localeString))
        return Locale.ITALIAN;
    if ("italy".equals(localeString))
        return Locale.ITALY;
    if ("japan".equals(localeString))
        return Locale.JAPAN;
    if ("japanese".equals(localeString))
        return Locale.JAPANESE;
    if ("korea".equals(localeString))
        return Locale.KOREA;
    if ("korean".equals(localeString))
        return Locale.KOREAN;
    if ("prc".equals(localeString))
        return Locale.PRC;
    if ("simplified_chinese".equals(localeString))
        return Locale.SIMPLIFIED_CHINESE;
    if ("taiwan".equals(localeString))
        return Locale.TAIWAN;
    if ("traditional_chinese".equals(localeString))
        return Locale.TRADITIONAL_CHINESE;
    if ("uk".equals(localeString))
        return Locale.UK;
    if ("us".equals(localeString))
        return Locale.US;

    String parts[] = localeString.split("_", -1);
    if (parts.length == 1)
        return new Locale(parts[0]);
    else if (parts.length == 2)
        return new Locale(parts[0], parts[1]);
    else
        return new Locale(parts[0], parts[1], parts[2]);
}

From source file:org.jfree.data.time.MinuteTest.java

/**
 * Some checks for the getStart() method.
 *///from ww w  . ja  v a 2s.  c  o  m
@Test
public void testGetStart() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    TimeZone savedZone = TimeZone.getDefault();
    TimeZone.setDefault(TimeZone.getTimeZone("Europe/Rome"));
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 16, 3, 47, 0);
    cal.set(Calendar.MILLISECOND, 0);
    Minute m = new Minute(47, 3, 16, 1, 2006);
    assertEquals(cal.getTime(), m.getStart());
    Locale.setDefault(saved);
    TimeZone.setDefault(savedZone);
}

From source file:org.jfree.data.time.SecondTest.java

/**
 * Some checks for the getStart() method.
 *//*from   w ww  .  jav  a2s .c o m*/
@Test
public void testGetStart() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 16, 3, 47, 55);
    cal.set(Calendar.MILLISECOND, 0);
    Second s = new Second(55, 47, 3, 16, 1, 2006);
    assertEquals(cal.getTime(), s.getStart());
    Locale.setDefault(saved);
}

From source file:org.jfree.data.time.SecondTest.java

/**
 * Some checks for the getEnd() method./*  ww  w .ja v  a2 s .  co  m*/
 */
@Test
public void testGetEnd() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 16, 3, 47, 55);
    cal.set(Calendar.MILLISECOND, 999);
    Second s = new Second(55, 47, 3, 16, 1, 2006);
    assertEquals(cal.getTime(), s.getEnd());
    Locale.setDefault(saved);
}

From source file:org.jfree.data.time.MinuteTest.java

/**
 * Some checks for the getEnd() method./*w  w w  .jav  a  2  s .  co  m*/
 */
@Test
public void testGetEnd() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    TimeZone savedZone = TimeZone.getDefault();
    TimeZone.setDefault(TimeZone.getTimeZone("Europe/Rome"));
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 16, 3, 47, 59);
    cal.set(Calendar.MILLISECOND, 999);
    Minute m = new Minute(47, 3, 16, 1, 2006);
    assertEquals(cal.getTime(), m.getEnd());
    Locale.setDefault(saved);
    TimeZone.setDefault(savedZone);
}

From source file:org.jfree.data.time.junit.MinuteTest.java

/**
 * Some checks for the getStart() method.
 *///w  w  w  . j  ava 2s  . c om
public void testGetStart() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    TimeZone savedZone = TimeZone.getDefault();
    TimeZone.setDefault(TimeZone.getTimeZone("Europe/Rome"));
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 16, 3, 47, 0);
    cal.set(Calendar.MILLISECOND, 0);
    Minute m = new Minute(47, 3, 16, 1, 2006);
    assertEquals(cal.getTime(), m.getStart());
    Locale.setDefault(saved);
    TimeZone.setDefault(savedZone);
}

From source file:org.jfree.data.time.YearTest.java

/**
 * Some checks for the getStart() method.
 *//* www . j  a  va  2 s.  c  om*/
@Test
public void testGetStart() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 1, 0, 0, 0);
    cal.set(Calendar.MILLISECOND, 0);
    Year y = new Year(2006);
    assertEquals(cal.getTime(), y.getStart());
    Locale.setDefault(saved);
}

From source file:org.jfree.data.time.HourTest.java

/**
 * Some checks for the getStart() method.
 *///from  ww  w .j  a  v  a2 s . c om
@Test
public void testGetStart() {
    Locale saved = Locale.getDefault();
    Locale.setDefault(Locale.ITALY);
    Calendar cal = Calendar.getInstance(Locale.ITALY);
    cal.set(2006, Calendar.JANUARY, 16, 3, 0, 0);
    cal.set(Calendar.MILLISECOND, 0);
    Hour h = new Hour(3, 16, 1, 2006);
    assertEquals(cal.getTime(), h.getStart());
    Locale.setDefault(saved);
}