org.apache.abdera.i18n.rfc4646
Class Subtag

java.lang.Object
  extended by org.apache.abdera.i18n.rfc4646.Subtag
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Subtag>

public final class Subtag
extends Object
implements Serializable, Cloneable, Comparable<Subtag>

A Lang tag subtag

See Also:
Serialized Form

Nested Class Summary
static class Subtag.Type
           
 
Constructor Summary
Subtag(Extlang extlang)
          Create a Subtag
Subtag(Language language)
          Create a Subtag
Subtag(Region region)
          Create a Subtag
Subtag(Script script)
          Create a Subtag
Subtag(Singleton singleton)
          Create a Subtag
Subtag(Subtag.Type type, String name)
          Create a Subtag
Subtag(Subtag.Type type, String name, Subtag prev)
          Create a Subtag
Subtag(Variant variant)
          Create a Subtag
 
Method Summary
 Subtag canonicalize()
          Return the canonicalized version of this subtag
 Subtag clone()
           
 int compareTo(Subtag o)
           
 boolean equals(Object obj)
           
<T extends Enum<?>>
T
getEnum()
          Get this subtags Enum, allowing the subtag to be verified
 String getName()
          Get the subtag value
 Subtag getNext()
          Get the next subtag
 Subtag getPrevious()
          Get the previous subtag
 Subtag.Type getType()
          Get the subtag type
 int hashCode()
           
 boolean isDeprecated()
          True if this subtag has been deprecated
 boolean isValid()
          True if this subtag is valid
static Subtag newWildcard()
          Create a new wildcard subtag
 String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Subtag

public Subtag(Language language)
Create a Subtag


Subtag

public Subtag(Script script)
Create a Subtag


Subtag

public Subtag(Region region)
Create a Subtag


Subtag

public Subtag(Variant variant)
Create a Subtag


Subtag

public Subtag(Extlang extlang)
Create a Subtag


Subtag

public Subtag(Singleton singleton)
Create a Subtag


Subtag

public Subtag(Subtag.Type type,
              String name)
Create a Subtag


Subtag

public Subtag(Subtag.Type type,
              String name,
              Subtag prev)
Create a Subtag

Method Detail

getType

public Subtag.Type getType()
Get the subtag type


getName

public String getName()
Get the subtag value


getPrevious

public Subtag getPrevious()
Get the previous subtag


getNext

public Subtag getNext()
Get the next subtag


toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

clone

public Subtag clone()
Overrides:
clone in class Object

isDeprecated

public boolean isDeprecated()
True if this subtag has been deprecated


getEnum

public <T extends Enum<?>> T getEnum()
Get this subtags Enum, allowing the subtag to be verified


isValid

public boolean isValid()
True if this subtag is valid


canonicalize

public Subtag canonicalize()
Return the canonicalized version of this subtag


newWildcard

public static Subtag newWildcard()
Create a new wildcard subtag


compareTo

public int compareTo(Subtag o)
Specified by:
compareTo in interface Comparable<Subtag>


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.