Path: csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: JavaFX Slider compile time error Date: Sat, 05 May 2012 21:09:23 -0700 Organization: albasani.net Lines: 35 Message-ID: References: <4fa58b39$0$41612$c3e8da3$3a1a2348@news.astraweb.com> <4fa5a141$0$20320$c3e8da3$9deca2c3@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net kR7hC7iFTbsjmTFOY1CgxVmeqdxItcVb1lsT81wCZnMhTrVXfhyA6VeD74goSEy0CGFOdZGiAthbelB7UnioEua0BX8fSCbeIgNXCyRoXUTo9jsqRgfd6C93nvtR9CpS NNTP-Posting-Date: Sun, 6 May 2012 04:09:24 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="Jjz9XmEBUOaqOPZKmigVgVCFFLeRud18CtB2wwOW+eyjf+8035YNGnxXMi0vuY0B3GHgP0VbWQi0d0EsGk3nNnkuOOU/jhL8IrGOcbif1CPGfAknUzISwK7xGivdQsoP"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 In-Reply-To: Cancel-Lock: sha1:wuCE0cy7Lp5dz1PL2u8Tvq5ZstM= Xref: csiph.com comp.lang.java.programmer:14327 On 05/05/2012 09:03 PM, Lew wrote: > On 05/05/2012 02:53 PM, Hiram Hunt wrote: >> "Leif Roar Moldskred" wrote in message >> news:APednd33hPX6EzjSnZ2dnUVZ8gudnZ2d@giganews.com... >>> Hiram Hunt wrote: >>>> Hello, >>>> I have some code that gets compile time errors in >>>> some places but not others. I don't understand why >>>> one situation is apparently legal and the other is not. >>>> Here is the copy-and-paste of a minimal example: >>> >>> I don't have a Java development environment at hand, but >>> it looks like a problem with generics. >>> >>>> // Create a SliderBuilder with the setting of several >>>> // properties omitted for the sake of a minimal example. >>>> >>>> SliderBuilder sliderbuilder = SliderBuilder >>>> .create(); >>> >>> Try "SliderBuilder sliderbuilder =" instead. OK, I finally checked out myself. I was wrong on several counts. Although I was right about the value of the Javadocs. It looks like a similar pattern to 'Enum' or 'Comparable', where the 'B' is the subtype of the 'Builder'. As others have said, the '' is the way to go. -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg