## com.sun.jersey.core.header
Class LanguageTag

    java.lang.Object
      com.sun.jersey.core.header.LanguageTag

Direct Known Subclasses:
  AcceptableLanguageTag

    public class LanguageTag

extends java.lang.Object

A language tag.

Author:
  Paul.Sandoz@Sun.Com

Field Summary
`protected java.lang.String` `primaryTag`
`protected java.lang.String` `subTags`
`protected java.lang.String` `tag`

Constructor Summary
`protected` `LanguageTag()`
`` `LanguageTag(HttpHeaderReader reader)`
`` `LanguageTag(java.lang.String header)`
`` `LanguageTag(java.lang.String primaryTag, java.lang.String subTags)`

Method Summary
`boolean` `equals(java.lang.Object object)`
`java.util.Locale` `getAsLocale()`
`java.lang.String` `getPrimaryTag()`
`java.lang.String` `getSubTags()`
`java.lang.String` `getTag()`
`int` `hashCode()`
`boolean` `isCompatible(java.util.Locale tag)`
`protected void` `parse(java.lang.String languageTag)`
`java.lang.String` `toString()`
`static LanguageTag` `valueOf(java.lang.String s)`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### tag

    protected java.lang.String tag

### primaryTag

    protected java.lang.String primaryTag

### subTags

    protected java.lang.String subTags

Constructor Detail

### LanguageTag

    protected LanguageTag()

### LanguageTag

    public LanguageTag(java.lang.String primaryTag,
                       java.lang.String subTags)

### LanguageTag

    public LanguageTag(java.lang.String header)
                throws java.text.ParseException

Throws:
  `java.text.ParseException`

### LanguageTag

    public LanguageTag(HttpHeaderReader reader)
                throws java.text.ParseException

Throws:
  `java.text.ParseException`

Method Detail

### valueOf

    public static LanguageTag valueOf(java.lang.String s)
                               throws java.lang.IllegalArgumentException

  Throws:
    `java.lang.IllegalArgumentException`

### isCompatible

    public final boolean isCompatible(java.util.Locale tag)

### getAsLocale

    public final java.util.Locale getAsLocale()

### parse

    protected final void parse(java.lang.String languageTag)
                        throws java.text.ParseException

  Throws:
    `java.text.ParseException`

### getTag

    public final java.lang.String getTag()

### getPrimaryTag

    public final java.lang.String getPrimaryTag()

### getSubTags

    public final java.lang.String getSubTags()

### equals

    public boolean equals(java.lang.Object object)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Copyright © 2017 Oracle Corporation. All Rights Reserved.