Mercurial > projects > dwt-addons
diff dwtx/core/commands/Parameterization.d @ 104:04b47443bb01
Reworked the collection uses to make use of a wrapper collection that is compatible to the Java Collections.
These new wrappers now use the tango.util.containers instead of the tango.util.collections.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 07 Aug 2008 15:01:33 +0200 |
parents | ea8ff534f622 |
children |
line wrap: on
line diff
--- a/dwtx/core/commands/Parameterization.d Sun Aug 03 17:01:51 2008 +0200 +++ b/dwtx/core/commands/Parameterization.d Thu Aug 07 15:01:33 2008 +0200 @@ -13,12 +13,11 @@ module dwtx.core.commands.Parameterization; -import tango.util.collection.model.Map; - import dwtx.core.commands.IParameter; import dwtx.core.internal.commands.util.Util; import dwt.dwthelper.utils; +import dwtx.dwtxhelper.Collection; /** * <p> @@ -136,14 +135,19 @@ * If the parameter needed to be initialized, but couldn't be. */ public final String getValueName() { - auto parameterValues = parameter.getValues().getParameterValues(); + Map parameterValues = parameter.getValues().getParameterValues(); + Iterator parameterValueItr = parameterValues.entrySet() + .iterator(); String returnValue = null; - foreach( k, v; parameterValues ){ - if (Util.equals(value, v)) { - returnValue = k; + while (parameterValueItr.hasNext()) { + Map.Entry entry = cast(Map.Entry) parameterValueItr.next(); + String currentValue = stringcast( entry.getValue()); + if (Util.equals(value, currentValue)) { + returnValue = stringcast( entry.getKey()); break; } } + if (returnValue is null) { return Util.ZERO_LENGTH_STRING; }