fr.umlv.jmmf.util
Class NameLengthPair
java.lang.Object
|
+--fr.umlv.jmmf.util.NameLengthPair
- All Implemented Interfaces:
- java.lang.Cloneable
- public final class NameLengthPair
- extends java.lang.Object
- implements java.lang.Cloneable
Pair composed by the method name and number of parameters.
The pair is a mutable object to avoid object allocation.
The method hashCode and equals are redifined to allow using
of NameLengthPair object as key in map.
The pair is cloneable.
Field Summary |
(package private) int |
length
|
(package private) java.lang.String |
name
|
Constructor Summary |
NameLengthPair()
Default constructor. |
NameLengthPair(java.lang.String name,
int length)
construct a pair with a name and a number of parameters. |
Method Summary |
java.lang.Object |
clone()
create a new NameLengthPair object. |
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
void |
init(java.lang.String name,
int length)
The pair is a mutable object to avoid
object allocation. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
,
finalize,
getClass,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
name
java.lang.String name
length
int length
NameLengthPair
public NameLengthPair()
- Default constructor.
NameLengthPair
public NameLengthPair(java.lang.String name,
int length)
- construct a pair with a name and a number of parameters.
clone
public java.lang.Object clone()
- create a new NameLengthPair object.
- Overrides:
- clone in class java.lang.Object
init
public void init(java.lang.String name,
int length)
- The pair is a mutable object to avoid
object allocation.
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
- hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
- equals in class java.lang.Object
Rémi Forax 1999,2000 Université de Marne la Vallée