Grant Robertson wrote:(No, this is not a question about JavaFX)
...
Now, I know enough about Java to know that the API must have been designed such that create() returns a datatype which has a layoutY() method, and layoutY() returns a datatype that has a textOrigin() method, and so on until build() returns an object of type Text. But, looking at the code it is impossible to tell which datatypes are returned at each stage.
I have dug around in the JavaDocs
luck, db
There are no new questions, but there may be new answers.
Grant Robertson wrote:Is this style of writing code actually common?
Grant Robertson wrote:Can I expect that most API designers won't lead me through a treasure-hunt game where each method returns yet some other, different object of a different class, bouncing all through the JavaDocs? Do they pretty much stick to the FooBuilder, FooBuilder, FooBuilder, Foo pattern?
Grant Robertson wrote:Is Foo usually immutable? Or does it just depend?
Pat Farrell wrote:The Guava library's Javadocs have a short code snippet that shows how to use the FooBuilder.
Guava loves immutable collections, it has tons of types and factories and examples. Obviously, if you have, say, an ImmutableList, you can then safely send it to lots of computer systems to work in parallel. Google, of course, has zillions of systems that run in parallel.
Grant Robertson wrote:Awesome, I will check it out when I am ready for a bit more cognitive loading.
Gotta go back and review generics first...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Campbell Ritchie wrote:...or Cai Horstmann’s GBC class, which is a much easier way to handle GridBagLayout than what is described in this well‑known tutorial.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Shown you WHAT? The GBC class or the tutorial?Winston Gutkowski wrote: . . . See? Now if somebody had shown me THAT, I'd still have some hair left...
Bookmarked.
Winston
Campbell Ritchie wrote:Shown you WHAT? The GBC class or the tutorial?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
SCJP
Visit my download page
Campbell Ritchie wrote: or Cai Horstmann’s GBC class, which is a much easier way to handle GridBagLayout
Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |