Re: Passing "<", ">", "=", etc as an argument to a method?
From: Stewart Gordon (smjg_1998_at_yahoo.com)
Date: 11/28/03
- Next message: US: "Re: What's the Big Java Development Environment These Days?"
- Previous message: kevinc: "Re: What's the Big Java Development Environment These Days?"
- In reply to: Anthony Borla: "Re: Passing "<", ">", "=", etc as an argument to a method?"
- Next in thread: Anthony Borla: "Re: Passing "<", ">", "=", etc as an argument to a method?"
- Reply: Anthony Borla: "Re: Passing "<", ">", "=", etc as an argument to a method?"
- Reply: Raymond DeCampo: "Re: Passing "<", ">", "=", etc as an argument to a method?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 Nov 2003 16:50:10 +0000
While it was 28/11/03 1:37 am throughout the UK, Anthony Borla sprinkled
little black dots on a white screen, and they fell thus:
<snip>
> if (relationalOp.equals("<"))
> doLessThan(value1, value2)
> else if (relationalOp.equals("="))
> doEquals(value1, value2)
> ...
Why not make relationalOp a number, and save the overhead of doing
string comparison?
Define
final static int EQ = 1;
final static int GT = 2;
final static int GTEQ = 3;
final static int LT = 4;
final static int LTEQ = 5;
final static int NOTEQ = 6;
and pass these values in.
Stewart.
-- My e-mail is valid but not my primary mailbox, aside from its being the unfortunate victim of intensive mail-bombing at the moment. Please keep replies on the 'group where everyone may benefit.
- Next message: US: "Re: What's the Big Java Development Environment These Days?"
- Previous message: kevinc: "Re: What's the Big Java Development Environment These Days?"
- In reply to: Anthony Borla: "Re: Passing "<", ">", "=", etc as an argument to a method?"
- Next in thread: Anthony Borla: "Re: Passing "<", ">", "=", etc as an argument to a method?"
- Reply: Anthony Borla: "Re: Passing "<", ">", "=", etc as an argument to a method?"
- Reply: Raymond DeCampo: "Re: Passing "<", ">", "=", etc as an argument to a method?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|