public class ParameterName extends java.lang.Object implements java.lang.Comparable<ParameterName>
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
pattern
Stores the regular expression that will remove all [] segments.
|
Constructor and Description |
---|
ParameterName(java.lang.String name)
Constructs a ParameterName for a given name from the HttpServletRequest.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ParameterName that)
Orders ParameterNames so that those with shorter (unstripped) names come first.
|
boolean |
equals(java.lang.Object obj)
Checks for equality as efficiently as possible.
|
java.lang.String |
getName()
Always returns the parameter name as passed in to the constructor.
|
java.lang.String |
getStrippedName()
Returns the name with all indexing and mapping components stripped.
|
int |
hashCode()
Simple hashcode method based on the name of the parameter.
|
boolean |
isIndexed()
Returns true if the name has indexing or mapping components, otherwise false.
|
java.lang.String |
toString()
Uses the original name as the string representation of the class.
|
public static final java.util.regex.Pattern pattern
public ParameterName(java.lang.String name)
name
- a name that may or may not contain indexing or mappingpublic boolean isIndexed()
public java.lang.String getName()
public java.lang.String getStrippedName()
public int compareTo(ParameterName that)
compareTo
in interface java.lang.Comparable<ParameterName>
that
- another ParameterName to compare topublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
? Copyright 2005-2006, Stripes Development Team.