public class Name
extends java.lang.Object
implements java.lang.Comparable
Modifier and Type | Method and Description |
---|---|
int |
busWidth()
Returns number of subnames of a bus.
|
static java.lang.String |
checkName(java.lang.String ns)
Method to check whether or not string is a valid name.
|
int |
compareTo(Name name)
Compares this Name with the specified Name for order.
|
int |
compareTo(java.lang.Object o)
Compares this Name with the specified object for order.
|
boolean |
equals(java.lang.Object anObject)
Compares this
Name to another Name ,
ignoring case considerations. |
static Name |
findName(java.lang.String ns)
Method to return the name object for this string.
|
Name |
findSuffixed(int i)
Returns the name obtained from base of this simple name by adding numerical suffix.
|
Name |
getBasename()
Returns basename of simple Name.
|
int |
getNumSuffix()
Returns numerical suffix of simple Name.
|
boolean |
hasDuplicates()
Tells whether Name has duplicate subnames.
|
boolean |
hasEmptySubnames()
Tells whether Name has duplicate subnames.
|
int |
hashCode()
Returns a hash code for this TextDescriptor.
|
boolean |
isBus()
Tells whether or not this Name is a bus name.
|
boolean |
isList()
Tells whether or not this Name is a list of names separated by comma.
|
boolean |
isTempname()
Tells whether or not this Name is a temporary name
|
boolean |
isValid()
Tells whether or not this Name is a valid bus or signal name.
|
Name |
lowerCase()
Returns lowerCase equivalent of this Name.
|
Name |
subname(int i)
Returns subname of a bus name.
|
java.lang.String |
toString()
Returns a printable version of this Name.
|
public static final Name findName(java.lang.String ns)
ns
- given stringpublic static java.lang.String checkName(java.lang.String ns)
ns
- given stringpublic final java.lang.String toString()
toString
in class java.lang.Object
public final Name lowerCase()
public int compareTo(Name name)
name
- the Name to be compared.public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- the Object to be compared.java.lang.ClassCastException
- if the specified object's type prevents it
from being compared to this Object.public boolean equals(java.lang.Object anObject)
Name
to another Name
,
ignoring case considerations. Two strings are considered equal
ignoring case if they are of the same length, and corresponding
characters in the two strings are equal ignoring case.equals
in class java.lang.Object
true
if names are equal,
ignoring case; false
otherwise.public int hashCode()
TextDescriptor
object is computed as sum of its fields.hashCode
in class java.lang.Object
public final boolean isValid()
public final boolean isTempname()
public final boolean hasDuplicates()
public final boolean hasEmptySubnames()
public final boolean isList()
public final boolean isBus()
public final Name subname(int i)
i
- an index of subname.public final int busWidth()
public final Name getBasename()
public final int getNumSuffix()
public final Name findSuffixed(int i)
i
- numerical suffix