1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4  *******************************************************************************
5  * Copyright (C) 2008-2012, International Business Machines Corporation and    *
6  * others. All Rights Reserved.                                                *
7  *******************************************************************************
8  */
9 package com.ibm.icu.impl.javaspi.text;
10 
11 import java.text.Collator;
12 import java.text.spi.CollatorProvider;
13 import java.util.Locale;
14 
15 import com.ibm.icu.impl.javaspi.ICULocaleServiceProvider;
16 import com.ibm.icu.impl.jdkadapter.CollatorICU;
17 
18 public class CollatorProviderICU extends CollatorProvider {
19 
20     @Override
getInstance(Locale locale)21     public Collator getInstance(Locale locale) {
22         com.ibm.icu.text.Collator icuCollator = com.ibm.icu.text.Collator.getInstance(
23                 ICULocaleServiceProvider.toULocaleNoSpecialVariant(locale));
24         return CollatorICU.wrap(icuCollator);
25     }
26 
27     @Override
getAvailableLocales()28     public Locale[] getAvailableLocales() {
29         return ICULocaleServiceProvider.getAvailableLocales();
30     }
31 
32 }
33