Home | History | Annotate | Download | only in locale
      1 /* GENERATED SOURCE. DO NOT MODIFY. */
      2 //  2016 and later: Unicode, Inc. and others.
      3 // License & terms of use: http://www.unicode.org/copyright.html#License
      4 /*
      5  *******************************************************************************
      6  * Copyright (C) 2009-2010, International Business Machines Corporation and    *
      7  * others. All Rights Reserved.                                                *
      8  *******************************************************************************
      9  */
     10 package android.icu.impl.locale;
     11 
     12 
     13 /**
     14  * @hide Only a subset of ICU is exposed in Android
     15  */
     16 public class Extension {
     17     private char _key;
     18     protected String _value;
     19 
     20     protected Extension(char key) {
     21         _key = key;
     22     }
     23 
     24     Extension(char key, String value) {
     25         _key = key;
     26         _value = value;
     27     }
     28 
     29     public char getKey() {
     30         return _key;
     31     }
     32 
     33     public String getValue() {
     34         return _value;
     35     }
     36 
     37     public String getID() {
     38         return _key + LanguageTag.SEP + _value;
     39     }
     40 
     41     @Override
     42     public String toString() {
     43         return getID();
     44     }
     45 }