Mercurial > projects > dwt-addons
diff dwtx/jface/text/templates/TemplateVariableType.d @ 162:1a5b8f8129df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 08 Sep 2008 00:51:37 +0200 |
parents | 3678e4f1a766 |
children |
line wrap: on
line diff
--- a/dwtx/jface/text/templates/TemplateVariableType.d Wed Aug 27 14:49:30 2008 +0200 +++ b/dwtx/jface/text/templates/TemplateVariableType.d Mon Sep 08 00:51:37 2008 +0200 @@ -45,7 +45,7 @@ /** * Value object that represents the type of a template variable. A type is defined by its name and * may have parameters. - * + * * @since 3.3 * @noinstantiate This class is not intended to be instantiated by clients. */ @@ -64,12 +64,12 @@ Assert.isLegal(name !is null); Assert.isLegal(params !is null); fName= name; - fParams= Collections.unmodifiableList(new ArrayList(Arrays.asList(params))); + fParams= Collections.unmodifiableList(new ArrayList(Arrays.asList(stringcast(params)))); } /** * Returns the type name of this variable type. - * + * * @return the type name of this variable type */ public String getName() { @@ -78,7 +78,7 @@ /** * Returns the unmodifiable and possibly empty list of parameters (element type: {@link String}) - * + * * @return the list of parameters */ public List getParams() { @@ -88,10 +88,10 @@ /* * @see java.lang.Object#equals(java.lang.Object) */ - public bool equals(Object obj) { + public override int opEquals(Object obj) { if ( cast(TemplateVariableType)obj ) { TemplateVariableType other= cast(TemplateVariableType) obj; - return other.fName.equals(fName) && other.fParams.equals(fParams); + return other.fName.equals(fName) && other.fParams.opEquals(cast(Object)fParams); } return false; } @@ -100,14 +100,14 @@ * @see java.lang.Object#hashCode() */ public override hash_t toHash() { + alias .toHash toHash; return fName.toHash() + fParams.toHash(); } - /* * @see java.lang.Object#toString() * @since 3.3 */ public override String toString() { - return fName + fParams.toString(); + return fName ~ (cast(Object)fParams).toString(); } }