org.jcoderz.commons
Class RegexString

java.lang.Object
  extended by org.jcoderz.commons.RegexString
All Implemented Interfaces:
Serializable, StrongType

public final class RegexString
extends Object
implements Serializable, StrongType

Type-safe string type.

 regular expression: foo|bar|buz
 
Instances of this class are immutable.

Author:
generated
See Also:
Serialized Form

Field Summary
static String REGULAR_EXPRESSION
          The regular expression matching RegexString.
static Pattern REGULAR_EXPRESSION_PATTERN
          The compiled pattern for the regular expression.
static String TYPE_NAME
          The name of this type.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
static RegexString fromString(String str)
          Creates a RegexString object from SXP String representation.
 int hashCode()
          Returns the hash code for the RegexString.
 String toString()
          Returns the SXP String representation of this RegexString.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final String TYPE_NAME
The name of this type.

See Also:
Constant Field Values

REGULAR_EXPRESSION

public static final String REGULAR_EXPRESSION
The regular expression matching RegexString.

See Also:
Constant Field Values

REGULAR_EXPRESSION_PATTERN

public static final Pattern REGULAR_EXPRESSION_PATTERN
The compiled pattern for the regular expression.

Method Detail

fromString

public static RegexString fromString(String str)
                              throws ArgumentMalformedException
Creates a RegexString object from SXP String representation.

Parameters:
str - The str representation of the RegexString to be returned.
Returns:
The RegexString object represented by this str.
Throws:
ArgumentMalformedException - If the given string s does not conform to the Simpay Interface representation of RegexString.

toString

public String toString()
Returns the SXP String representation of this RegexString.

Overrides:
toString in class Object
Returns:
The SXP String representation of this RegexString.

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the object to compare to.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns the hash code for the RegexString.

Overrides:
hashCode in class Object
Returns:
the hash code for the RegexString.


Copyright 2007 The jCoderZ Project.