All Packages Class Hierarchy This Package Previous Next Index
Class EDU.bmrb.starlibj.StarValidity
java.lang.Object
|
+----EDU.bmrb.starlibj.StarValidity
- public class StarValidity
- extends Object
This is a set of some simple utility methods that are used throughout
the starlibj. Mostly they deal with string syntax checks. These
routines are used by the starlibj functions to decide if certain
operations should be rejected. (For example, deciding if a string
is an acceptable saveframe name or tagname.) They are left public
so that the caller of this package/library can use them too.
-
StarValidity()
-
-
isValidBlockName(String)
- Returns true if the string is a valid data/global block name.
-
isValidForDelim(String, int)
- Determines if the string given is valid for the delimiter
type given (from DataValueNode).
-
isValidSaveName(String)
- Returns true if the string is a valid saveframe name.
-
isValidTagName(String)
- Returns true if the string is a valid tag name.
-
isValidValueForDoubleDelim(String)
- Returns true if the string given is valid for a
double-quote delimiter in a DataValueNode.
-
isValidValueForFrameCodeDelim(String)
- Returns true if the string given is valid for a
framecode delimiter (dollar sign) in a DataValueNode,
-
isValidValueForNonDelim(String)
- Returns true if the string given is valid for a
nondelimited DataValueNode (no whitespace).
-
isValidValueForSingleDelim(String)
- Returns true if the string given is valid for a
single-quote delimiter in a DataValueNode.
-
parseValFrom(String, boolean)
- Given a string, parse (starting at the first char and extending
until valid syntax is exhausted) a value string in STAR syntax.
-
pkgName()
- Returns the String name of this package.
StarValidity
public StarValidity()
pkgName
public static String pkgName()
- Returns the String name of this package. This is needed
because Java loses the 'import' information at runtime,
and therefore we have to give full-path names for
types when looking at the Class object. (e.g. you can't
just say:
Class.forName("Vector")... // (won't work)
You have to say:
Class.forName("java.lang.Vector")...
- Returns:
- The package name for this class.
isValidTagName
public static boolean isValidTagName(String s)
- Returns true if the string is a valid tag name.
- Returns:
- true if valid, false if invalid
isValidSaveName
public static boolean isValidSaveName(String s)
- Returns true if the string is a valid saveframe name.
- Returns:
- true if valid, false if invalid
isValidBlockName
public static boolean isValidBlockName(String s)
- Returns true if the string is a valid data/global block name.
- Returns:
- true if valid, false if invalid
isValidValueForNonDelim
public static boolean isValidValueForNonDelim(String s)
- Returns true if the string given is valid for a
nondelimited DataValueNode (no whitespace).
- Returns:
- true if valid, false if invalid
isValidValueForSingleDelim
public static boolean isValidValueForSingleDelim(String s)
- Returns true if the string given is valid for a
single-quote delimiter in a DataValueNode.
isValidValueForDoubleDelim
public static boolean isValidValueForDoubleDelim(String s)
- Returns true if the string given is valid for a
double-quote delimiter in a DataValueNode.
isValidValueForFrameCodeDelim
public static boolean isValidValueForFrameCodeDelim(String s)
- Returns true if the string given is valid for a
framecode delimiter (dollar sign) in a DataValueNode,
isValidForDelim
public static boolean isValidForDelim(String s,
int delim)
- Determines if the string given is valid for the delimiter
type given (from DataValueNode).
- Returns:
- true = valid, false = invalid.
- See Also:
- DataValueNode
parseValFrom
public static ParseValFromRetVal parseValFrom(String str,
boolean makeNew)
- Given a string, parse (starting at the first char and extending
until valid syntax is exhausted) a value string in STAR syntax.
- Parameters:
- str - the string to parse through.
- makeNew - set to true to return a new String, false not to.
Setting it to false is useful when you want to
parse for the end of the string, but you don't
care what the string is (you are skipping past
the value.)
- Returns:
- The string and delimiter type in a ParseValFromRetVal
structure.
All Packages Class Hierarchy This Package Previous Next Index