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.


Constructor Index

 o StarValidity()

Method Index

 o isValidBlockName(String)
Returns true if the string is a valid data/global block name.
 o isValidForDelim(String, int)
Determines if the string given is valid for the delimiter type given (from DataValueNode).
 o isValidSaveName(String)
Returns true if the string is a valid saveframe name.
 o isValidTagName(String)
Returns true if the string is a valid tag name.
 o isValidValueForDoubleDelim(String)
Returns true if the string given is valid for a double-quote delimiter in a DataValueNode.
 o isValidValueForFrameCodeDelim(String)
Returns true if the string given is valid for a framecode delimiter (dollar sign) in a DataValueNode,
 o isValidValueForNonDelim(String)
Returns true if the string given is valid for a nondelimited DataValueNode (no whitespace).
 o isValidValueForSingleDelim(String)
Returns true if the string given is valid for a single-quote delimiter in a DataValueNode.
 o 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.
 o pkgName()
Returns the String name of this package.

Constructors

 o StarValidity
 public StarValidity()

Methods

 o 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.
 o isValidTagName
 public static boolean isValidTagName(String s)
Returns true if the string is a valid tag name.

Returns:
true if valid, false if invalid
 o isValidSaveName
 public static boolean isValidSaveName(String s)
Returns true if the string is a valid saveframe name.

Returns:
true if valid, false if invalid
 o 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
 o 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
 o isValidValueForSingleDelim
 public static boolean isValidValueForSingleDelim(String s)
Returns true if the string given is valid for a single-quote delimiter in a DataValueNode.

 o isValidValueForDoubleDelim
 public static boolean isValidValueForDoubleDelim(String s)
Returns true if the string given is valid for a double-quote delimiter in a DataValueNode.

 o isValidValueForFrameCodeDelim
 public static boolean isValidValueForFrameCodeDelim(String s)
Returns true if the string given is valid for a framecode delimiter (dollar sign) in a DataValueNode,

 o 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
 o 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