Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Cecil Westerhof Newsgroups: comp.lang.java.programmer Subject: Re: Compare generics (that are numbers) Date: Wed, 29 Jul 2020 20:42:54 +0200 Organization: Decebal Computing Lines: 19 Message-ID: <87ft9a6u35.fsf@munus.decebal.nl> References: <87k0ym73id.fsf@munus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="79ff8c6ea305f6a25ce9fe89b8d0bb76"; logging-data="2864"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18e+TFYBptC2ZWGh6/UlOPHdcm2kqAxetM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cancel-Lock: sha1:BDY4x61TiScT/AwGTta2rw1t8ok= sha1:jFWp3MtCCoFY7vaQV7psLNGbXEM= Xref: csiph.com comp.lang.java.programmer:39593 Eric Sosman writes: > On 7/29/2020 11:19 AM, Cecil Westerhof wrote: >> I have a class that starts with: >> abstract class CalcValuesGeneric { >> >> E will be Integer, int, Float or float. (For now, but always a Number.) >> What is the best way to determine which of the two is lower? > > Aside: How can you get `' to be `' or `'? Is that > something new? I'm still on Java 8, but the JLS for 14 says "Seq > is illegal, as primitive types cannot be type arguments." (4.5) You are completely right, I was not thinking straight. :'-( -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof