93 |
} |
} |
94 |
|
|
95 |
/** |
/** |
96 |
* Returns the name of this sampler engine. |
* Compares this <code>SamplerEngine</code> instance to the specified object. |
97 |
* @return The name of this sampler engine. |
* The result is <code>true</code> if <code>obj</code> is reference to |
98 |
|
* <code>this</code>, or if <code>obj</code> is a <code>SamplerEngine</code> instance |
99 |
|
* and has non-<code>null</code> name equal to the name of this engine. |
100 |
|
* |
101 |
|
* @return <code>true</code> if <code>obj</code> is reference to |
102 |
|
* <code>this</code>, or if <code>obj</code> is a <code>SamplerEngine</code> instance |
103 |
|
* and has non-<code>null</code> name equal to the name of this engine; |
104 |
|
* <code>false</code> otherwise. |
105 |
|
* @see #getName |
106 |
|
*/ |
107 |
|
public boolean |
108 |
|
equals(Object obj) { |
109 |
|
if(this == obj) return true; |
110 |
|
|
111 |
|
if(getName() == null || obj == null) return false; |
112 |
|
|
113 |
|
if(obj instanceof SamplerEngine) |
114 |
|
return getName().equals(((SamplerEngine)obj).getName()); |
115 |
|
|
116 |
|
return false; |
117 |
|
} |
118 |
|
|
119 |
|
/** |
120 |
|
* Returns the description of this sampler engine. |
121 |
|
* @return The description of this sampler engine. |
122 |
*/ |
*/ |
123 |
public String |
public String |
124 |
toString() { return getName(); } |
toString() { return getDescription(); } |
125 |
} |
} |