|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbyucc.edif.NamedObject
public class NamedObject
Provides a String name and the ability to create Edif
output by implementing the EdifNameable interface. These names are
assumed to be valid EDIF 2.0 String names. This object is immutable.
Edif Identifier Specification:
Identifier is a basic token type; it is used for name definition, name reference, keywords, and symbolic constants. It contains alphanumeric or underscore characters and must be preceded with an ampersand if the first character is not a letter. This will normally be recognized by a lexcial scanner.
Case is not significant in identifiers. There are no reserved identifiers, except within keywordNameDef. The length of an identifier must be between 1 and 256 characters, excluding the optional ampersand character. Identifiers are terminated by whiteSpace or by a left or right parenthesis.
Rename can be used to express external names which do not conform to the identifier syntax.
Example:
a12
&a12
A12
abc
&12s
&120
The first three identifiers in this example are identical. The last two must include the ampersand.
| Field Summary | |
|---|---|
private java.lang.String |
_name
The String name of this object. |
| Constructor Summary | |
|---|---|
NamedObject(java.lang.String name)
Constructs a NamedObject with the name string initalized. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Perform a "deep" clone of the object. |
static EdifNameable |
createValidEdifNameable(java.lang.String string)
This method will create a new EdifNameable object from the given string. |
static java.lang.String |
createValidEdifString(java.lang.String string)
This method will check the string to see if it is a valid Edif string. |
boolean |
equals(java.lang.Object cmp)
Compares this Object's name to the given Object. |
java.lang.String |
getName()
Return the String name. |
static boolean |
isValidEdifName(java.lang.String string)
This method will test if the input string is a valid Edif name |
void |
toEdif(EdifPrintWriter epw)
Converts this object to EDIF format, and writes the data to the passed-in EdifPrintWriter Object. |
java.lang.String |
toString()
Return the name of the object (same as the getName() method). |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String _name
| Constructor Detail |
|---|
public NamedObject(java.lang.String name)
name - String name of NamedObject.| Method Detail |
|---|
public java.lang.Object clone()
clone in interface EdifNameableclone in class java.lang.Objectpublic static EdifNameable createValidEdifNameable(java.lang.String string)
string - The Name of this Object that will be used to
create a valid EDIF name if it isn't one already
EdifNameable Object that contains name
information about this NamedObject Objectpublic static java.lang.String createValidEdifString(java.lang.String string)
string - The String representation for a Name, which will
be used as a base to make the name valid, unless it already is
public boolean equals(java.lang.Object cmp)
equals in class java.lang.Objectcmp - The Object to compare to this one
public java.lang.String getName()
getName in interface Nameablepublic static boolean isValidEdifName(java.lang.String string)
string - the input string
public void toEdif(EdifPrintWriter epw)
toEdif in interface EdifOutepw - The EdifPrintWriter that the EDIF data will be
written topublic java.lang.String toString()
getName() method).
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||