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


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

Re: use case for extending enum, but this is not possible in java

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!feeder2.ecngs.de!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail
NNTP-Posting-Date Sun, 15 Jun 2014 06:04:09 -0500
From "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org>
Newsgroups comp.lang.java.programmer
References <lniljr$8h9$1@news.m-online.net>
Subject Re: use case for extending enum, but this is not possible in java
Date Sun, 15 Jun 2014 11:58:51 +0100
X-Priority 3
X-MSMail-Priority Normal
X-Newsreader Microsoft Outlook Express 6.00.2900.5512
X-RFC2646 Format=Flowed; Response
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.5512
Message-ID <m8mdnb2Gwek04ADOnZ2dnUVZ8v-dnZ2d@bt.com> (permalink)
Lines 19
X-Usenet-Provider http://www.giganews.com
X-AuthenticatedUsername NoAuthUser
X-Trace sv3-Qwp/k0vod3weznz7J69KEXMp5rB+MVqlD93P+3eiQNCRyqDluAI8SEViZAIgFola7pTnXf9E1M36XGd!VW5oHvxSxgAgn0y3Ec0HkXeQJV4p4sy19NRgOg+8ipIGjSevhS5tWmKx+p4mSkZpn5x/uDVsPg==
X-Complaints-To abuse@btinternet.com
X-DMCA-Complaints-To abuse@btinternet.com
X-Abuse-and-DMCA-Info Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info Otherwise we will be unable to process your complaint properly
X-Postfilter 1.3.40
X-Original-Bytes 1916
Xref csiph.com comp.lang.java.programmer:28747

Show key headers only | View raw


Laura Schmidt wrote:

> Now I am making a cut: The generic class Listing<T> should be moved into
> a generic java library, so that it can be used by different
> applications. So I also need to move the interface ListCommandProcesor
> into this library, and this would implicate that I also move the enum
> ListCommand into the library. But the enum ListCommand ist application
> specific.

Think objects not integers (Java's enums aren't "integers in drag" anyway).

You have these command "things".  What does the general library need to know 
about them ?  Anything ?  If not then declare them as java.lang.Object. 
Otherwise either use an interface or generics (or both) to express the 
constraints on them.

    -- chris 

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


Thread

use case for extending enum, but this is not possible in java Laura Schmidt <ls@mailinator.com> - 2014-06-15 01:24 +0200
  Re: use case for extending enum, but this is not possible in java Steven Simpson <ss@domain.invalid> - 2014-06-15 01:04 +0100
  Re: use case for extending enum, but this is not possible in java Marcel Müller <news.5.maazl@spamgourmet.org> - 2014-06-15 02:53 +0200
  Re: use case for extending enum, but this is not possible in java markspace <markspace@nospam.nospam> - 2014-06-14 18:58 -0700
  Re: use case for extending enum, but this is not possible in java Robert Klemme <shortcutter@googlemail.com> - 2014-06-15 12:20 +0200
  Re: use case for extending enum, but this is not possible in java Robert Klemme <shortcutter@googlemail.com> - 2014-06-15 12:21 +0200
  Re: use case for extending enum, but this is not possible in java "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2014-06-15 11:58 +0100
  Re: use case for extending enum, but this is not possible in java Wanja Gayk <brixomatic@yahoo.com> - 2014-06-16 01:08 +0200
  Re: use case for extending enum, but this is not possible in java Roedy Green <see_website@mindprod.com.invalid> - 2014-06-15 22:20 -0700

csiph-web