it happened to me when I used the Object and String argument method. It
goes for the Object argument. It must be because both are objects and in
case of ambiguity it goes to the object argument by default.
jose
At 16:32 3/12/2002 +0530, you wrote:
>Hi,
> This is a bit OffTopic. I have written following overloaded methods.
>private boolean validate(Tag tag, Object value)
>private boolean validate(Tag tag, Number value)
>private boolean validate(Tag tag, String value)
>private boolean validate(Tag tag, Boolean value)
>
>The invoking code is in the same class. The relevant part is given below
>
> Set set = valuesMap.entrySet();
> Iterator itr = set.iterator();
> String tagname, msg;
> Object value, tag;
> Map.Entry entry;
> Tag t;
> boolean valid;
> while (itr.hasNext()) {
> entry = (Map.Entry) itr.next();
> tagname = (String) entry.getKey();
> value = entry.getValue();
> tag = tagMap.get(tagname);
> <file://if>file://if not null and valid, then remove it from the
> valuesMap and send for writing
> if ((tag != null) && (value != null) && validate((Tag) tag, value)) {
> <file://do>file://do something
> }
>
>I am having an entry in the map as "name"=Float . At execution time, I
>expected the method validate(Tag, Number) to be invoked rather than
>validate(Tag, Object). But I observed that validate(Tag, Object) was
>invoked. I am confused by this behaviour. Am I missing something ?
>
>TIA,
>-sourabh
>----
>Sourabh Kulkarni
>Embedded Systems Group.
>rapidEffect (P) Ltd.25,Napier Road, Pune 411 001
>Tel./Fax. +91-20-6363250
>
><http://www.rapideffect.com>www.rapideffect.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html