wtanaka.praya.gale
Class Category
java.lang.Object
|
+--wtanaka.praya.gale.Category
- public class Category
- extends java.lang.Object
Typesafe wrapper for String representing a gale category.
Return to
or the Praya Homepage
- Version:
- $Name: $ $Date: 2001/09/30 21:14:52 $
- Author:
- $Author: wtanaka $
|
Constructor Summary |
Category(java.lang.String catString)
|
|
Method Summary |
static java.lang.String |
arrayToColonSep(Category[] cats)
|
static Category[] |
colonSepToArray(java.lang.String cats)
|
boolean |
contains(Category other)
Returns true if this is a prefix of the given category. |
java.lang.String |
getDomain()
When this is a directed category, get everything before the first
slash. |
java.lang.String |
getFullString()
The full string representing this category that was used to
construct this. |
java.lang.String |
getRest()
When this is a directed category, get everything after the first
slash. |
boolean |
isDirected()
|
(package private) java.lang.String |
toLocationString()
If this category is directed, and getRest() begins with "user/",
then return the corresponding Location. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
m_isDirected
private boolean m_isDirected
m_fullString
private java.lang.String m_fullString
m_domain
private java.lang.String m_domain
m_rest
private java.lang.String m_rest
Category
public Category(java.lang.String catString)
- Parameters:
catString - a non-null string representing a category
string.
isDirected
public boolean isDirected()
getFullString
public java.lang.String getFullString()
- The full string representing this category that was used to
construct this.
getRest
public java.lang.String getRest()
- When this is a directed category, get everything after the first
slash.
- Returns:
- everything after the first slash if this is a directed
category, otherwise null.
getDomain
public java.lang.String getDomain()
- When this is a directed category, get everything before the first
slash.
- Returns:
- everything before the first slash if this is a directed
category, otherwise null.
contains
public boolean contains(Category other)
- Returns true if this is a prefix of the given category.
toLocationString
java.lang.String toLocationString()
- If this category is directed, and getRest() begins with "user/",
then return the corresponding Location.
arrayToColonSep
public static java.lang.String arrayToColonSep(Category[] cats)
colonSepToArray
public static Category[] colonSepToArray(java.lang.String cats)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object