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