com.google.caja.util
Class Name
java.lang.Object
com.google.caja.util.Name
- All Implemented Interfaces:
- MessagePart, java.lang.Comparable<Name>
public final class Name
- extends java.lang.Object
- implements java.lang.Comparable<Name>, MessagePart
A case insensitive identifier such as an element or identifier name that can
be used for equality checks, and as a key in Maps and Sets.
This should be derived from a String as close to the parsing as possible so
that it's obvious what kind of case-sensitivity conventions are required for
the label.
- Author:
- mikesamuel@gmail.com
Constructor Summary |
private |
Name(java.lang.String canonicalForm)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
canonicalForm
private final java.lang.String canonicalForm
Name
private Name(java.lang.String canonicalForm)
css
public static Name css(java.lang.String cssName)
- The case-insensitive name of a CSS property, symbol, function or keyword.
getCanonicalForm
public java.lang.String getCanonicalForm()
equals
public boolean equals(java.lang.Object o)
- 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
compareTo
public int compareTo(Name that)
- Specified by:
compareTo
in interface java.lang.Comparable<Name>
format
public void format(MessageContext context,
java.lang.Appendable out)
throws java.io.IOException
- Description copied from interface:
MessagePart
- Formats this part to out.
- Specified by:
format
in interface MessagePart
out
- receives the formatted form of this.
- Throws:
java.io.IOException
Copyright (C) 2008 Google Inc.
Licensed under the Apache License, Version 2.0