Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #11419

Re: enum paralellism

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe10.iad.POSTED!83aa503d!not-for-mail
From Daniel Pitts <newsgroup.nospam@virtualinfinity.net>
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version 1.0
Newsgroups comp.lang.java.programmer
Subject Re: enum paralellism
References <4tb8h7h2tul5rq4m5bk9sg485tq33qi394@4ax.com> <jf1g0r$ua$1@dont-email.me> <dodbh7t37pqvn5teiu806s627h1hl0070v@4ax.com>
In-Reply-To <dodbh7t37pqvn5teiu806s627h1hl0070v@4ax.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Lines 26
Message-ID <LdjRq.963$744.783@newsfe10.iad> (permalink)
X-Complaints-To abuse@newsrazor.net
NNTP-Posting-Date Tue, 17 Jan 2012 18:37:31 UTC
Date Tue, 17 Jan 2012 10:37:31 -0800
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:11419

Show key headers only | View raw


On 1/17/12 10:08 AM, Roedy Green wrote:
> On Mon, 16 Jan 2012 10:33:46 -0500, Eric Sosman
> <esosman@ieee-dot-org.invalid>  wrote, quoted or indirectly quoted
> someone who said :
>
>>      Is this parallelism a result of using classes from different
>> sources, each with its own enum to represent the same set of things?
>
> Is is a general question hoping to collect techniques that might apply
> in different circumstances.  However, what triggered it is I have
> three different enums:
>
> 1. online bookstores where you look things up by ISBN.  I probe the
> bookstore to see if they have a given book in stock by looking for
> snippets in the response e.g.
<snip>
> There are similar enums for DVDs stores that look up by UPC, and
> Amazon stores that look up by ASIN. The other way to deal with it
> would be to combine them in to one big enum with parms to keep track
> of the subtype.

While an interesting approach, I would personally look into 
externalizing that into a configuration file, rather than inlining it as 
enums. That way you don't need to recompile when you update your settings.

In any case, see my other message about how to achieve what you're asking.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

enum paralellism Roedy Green <see_website@mindprod.com.invalid> - 2012-01-16 06:16 -0800
  Re: enum paralellism Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-01-16 10:33 -0500
    [OT] East and West in Oz (Was: enum paralellism) Lew <noone@lewscanon.com> - 2012-01-16 10:32 -0800
    Re: enum paralellism Roedy Green <see_website@mindprod.com.invalid> - 2012-01-17 10:08 -0800
      Re: enum paralellism Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-01-17 10:37 -0800
  Re: enum paralellism Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-01-17 10:34 -0800

csiph-web