comp.lang.ada
 help / color / mirror / Atom feed
From: No Spam <nospam@nospam.com>
Subject: Re: Contrained ada type in java
Date: Wed, 17 Dec 2003 09:54:41 -0500
Date: 2003-12-17T09:54:41-05:00	[thread overview]
Message-ID: <tdr0uvs163vi2cnhnae8b9nmk2jq2djsk9@4ax.com> (raw)
In-Reply-To: sbrvtvgdcdjps866mbuonffsl816ucgipd@4ax.com

Compare

>| public boolean equals(Object obj) {
>|       // Assume proper type was given             <<<<------
>|       return (__level == ((Volume)obj).__level);
>|     }
>|
>|     public int compareTo(Object obj) {
>|       // Assume proper type was given             <<<<------
>|       int other = ((Volume)obj).__level;

With

>| It is quite a lot of work just to get the functionality of
>| enumerated types. Simply using integer constants will be sufficient
>| for most programs, but when value restriction and type safety become <<<<-------
>| issues, you will have to resort to some variation of the more
>| complicated solution.




      reply	other threads:[~2003-12-17 14:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-10 22:17 Contrained ada type in java Ed Trubia
2003-12-11  3:56 ` David C. Hoos, Sr.
2003-12-11 17:56   ` Jeffrey Carter
2003-12-17  5:56   ` Craig Carey
2003-12-17 14:54     ` No Spam [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox