Open bfly opened 4 years ago
I'll put them up. It was difficult because the sealed classes and records need JDK 15. My project was on JDK 14. That's why it was separate. Let me strategize. Glad you found the repo.
HTTP Client is here github.com/dhinojosa/http-client-study
On Wed, Jul 1, 2020 at 12:27 PM Bill Fly notifications@github.com wrote:
Would like to see more examples, such as Tree interface and permit and records. HttpClient. The examples you showed were very interesting and informative.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dhinojosa/state-of-java-2020/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADEJBLZ4KRM6YAQL6BTTNDRZN52TANCNFSM4ONZA7YA .
Dan, I watched the recording and was able to find the sealed interface a records. I got it to accept them, but I am having trouble using them I had to install Idea 2020.2 EAP and latest 15 EA. I am struggling trying to use them to actually creat a Binary Search Tree. Bill
From: Daniel Hinojosa notifications@github.com Reply-To: dhinojosa/state-of-java-2020 reply@reply.github.com Date: Wednesday, July 1, 2020 at 4:49 PM To: dhinojosa/state-of-java-2020 state-of-java-2020@noreply.github.com Cc: Bill Fly billfly@programmer.net, Author author@noreply.github.com Subject: Re: [dhinojosa/state-of-java-2020] More examples from webinar (#1)
I'll put them up. It was difficult because the sealed classes and records need JDK 15. My project was on JDK 14. That's why it was separate. Let me strategize. Glad you found the repo.
HTTP Client is here github.com/dhinojosa/http-client-study
On Wed, Jul 1, 2020 at 12:27 PM Bill Fly notifications@github.com wrote:
Would like to see more examples, such as Tree interface and permit and records. HttpClient. The examples you showed were very interesting and informative.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dhinojosa/state-of-java-2020/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADEJBLZ4KRM6YAQL6BTTNDRZN52TANCNFSM4ONZA7YA .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/dhinojosa/state-of-java-2020/issues/1#issuecomment-652663433, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AANQTYQCY27TNNR73KXFBTTRZOVNBANCNFSM4ONZA7YA.
Dan, I can’t figure out how to tie nodes together if Node and Branch are siblings.
From: Daniel Hinojosa notifications@github.com Reply-To: dhinojosa/state-of-java-2020 reply@reply.github.com Date: Wednesday, July 1, 2020 at 4:49 PM To: dhinojosa/state-of-java-2020 state-of-java-2020@noreply.github.com Cc: Bill Fly billfly@programmer.net, Author author@noreply.github.com Subject: Re: [dhinojosa/state-of-java-2020] More examples from webinar (#1)
I'll put them up. It was difficult because the sealed classes and records need JDK 15. My project was on JDK 14. That's why it was separate. Let me strategize. Glad you found the repo.
HTTP Client is here github.com/dhinojosa/http-client-study
On Wed, Jul 1, 2020 at 12:27 PM Bill Fly notifications@github.com wrote:
Would like to see more examples, such as Tree interface and permit and records. HttpClient. The examples you showed were very interesting and informative.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dhinojosa/state-of-java-2020/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADEJBLZ4KRM6YAQL6BTTNDRZN52TANCNFSM4ONZA7YA .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/dhinojosa/state-of-java-2020/issues/1#issuecomment-652663433, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AANQTYQCY27TNNR73KXFBTTRZOVNBANCNFSM4ONZA7YA.
Posting now. ;)
Instructions are on the readme
https://github.com/dhinojosa/jdk15-analysis
On Wed, Jul 1, 2020 at 3:55 PM Bill Fly notifications@github.com wrote:
Dan, I can’t figure out how to tie nodes together if Node and Branch are siblings.
From: Daniel Hinojosa notifications@github.com Reply-To: dhinojosa/state-of-java-2020 reply@reply.github.com Date: Wednesday, July 1, 2020 at 4:49 PM To: dhinojosa/state-of-java-2020 state-of-java-2020@noreply.github.com Cc: Bill Fly billfly@programmer.net, Author author@noreply.github.com Subject: Re: [dhinojosa/state-of-java-2020] More examples from webinar (#1)
I'll put them up. It was difficult because the sealed classes and records need JDK 15. My project was on JDK 14. That's why it was separate. Let me strategize. Glad you found the repo.
HTTP Client is here github.com/dhinojosa/http-client-study
On Wed, Jul 1, 2020 at 12:27 PM Bill Fly notifications@github.com wrote:
Would like to see more examples, such as Tree interface and permit and records. HttpClient. The examples you showed were very interesting and informative.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dhinojosa/state-of-java-2020/issues/1, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AADEJBLZ4KRM6YAQL6BTTNDRZN52TANCNFSM4ONZA7YA
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://github.com/dhinojosa/state-of-java-2020/issues/1#issuecomment-652663433>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AANQTYQCY27TNNR73KXFBTTRZOVNBANCNFSM4ONZA7YA
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dhinojosa/state-of-java-2020/issues/1#issuecomment-652665613, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADEJBOCW3A27NSTJYPTLVDRZOWERANCNFSM4ONZA7YA .
Dan, Java records are immutable? I visualize a BST node as a value, and a left and right node. I don’t see how to use a record for a node, because you add a node to a tree and then later add a node to the left or right subnode. Am I not looking at this correctly? Bill
Bill Fly Adjunct Instructor Brookhaven Campus 972.849.5137 [Dallas College Logo]
Caffeine-Based is a nickname term used to refer to any program written in Java. “When you have a good idea, and you’ve tried it and know it is going to work, go ahead and do it – because it is much easier to apologize later than it is to get permission”. Adm Grace Murray Hopper “The best things in life are often waiting for you at the exit ramp of your comfort zone”. Karen Salmansohn
From: Daniel Hinojosa notifications@github.com Reply-To: dhinojosa/state-of-java-2020 reply@reply.github.com Date: Wednesday, July 1, 2020 at 5:34 PM To: dhinojosa/state-of-java-2020 state-of-java-2020@noreply.github.com Cc: Bill Fly billfly@programmer.net, Author author@noreply.github.com Subject: Re: [dhinojosa/state-of-java-2020] More examples from webinar (#1)
Posting now. ;)
Instructions are on the readme
https://github.com/dhinojosa/jdk15-analysis
On Wed, Jul 1, 2020 at 3:55 PM Bill Fly notifications@github.com wrote:
Dan, I can’t figure out how to tie nodes together if Node and Branch are siblings.
From: Daniel Hinojosa notifications@github.com Reply-To: dhinojosa/state-of-java-2020 reply@reply.github.com Date: Wednesday, July 1, 2020 at 4:49 PM To: dhinojosa/state-of-java-2020 state-of-java-2020@noreply.github.com Cc: Bill Fly billfly@programmer.net, Author author@noreply.github.com Subject: Re: [dhinojosa/state-of-java-2020] More examples from webinar (#1)
I'll put them up. It was difficult because the sealed classes and records need JDK 15. My project was on JDK 14. That's why it was separate. Let me strategize. Glad you found the repo.
HTTP Client is here github.com/dhinojosa/http-client-study
On Wed, Jul 1, 2020 at 12:27 PM Bill Fly notifications@github.com wrote:
Would like to see more examples, such as Tree interface and permit and records. HttpClient. The examples you showed were very interesting and informative.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dhinojosa/state-of-java-2020/issues/1, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AADEJBLZ4KRM6YAQL6BTTNDRZN52TANCNFSM4ONZA7YA
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://github.com/dhinojosa/state-of-java-2020/issues/1#issuecomment-652663433>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AANQTYQCY27TNNR73KXFBTTRZOVNBANCNFSM4ONZA7YA
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dhinojosa/state-of-java-2020/issues/1#issuecomment-652665613, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADEJBOCW3A27NSTJYPTLVDRZOWERANCNFSM4ONZA7YA .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/dhinojosa/state-of-java-2020/issues/1#issuecomment-652679064, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AANQTYXV2UOC62B6Y3XAVGTRZO2YHANCNFSM4ONZA7YA.
It is from an example in Scala that comes I think from the original steps book,
sealed trait Tree[+A]case class Leaf[A](value: A) extends Tree[A]case class Branch[A](left: Tree[A], right: Tree[A]) extends Tree[A]
One thing I did though was name it Node instead of Leaf and I didn't parameterize it. Same concept though. In my Runner, I am constructing Branch and Node and assigning it to a Tree. Records are definitely immutable.
For your other question Branch accepts other Trees so you can create complex trees.
Tree tree2 = new Branch(
new Branch(new Node(20), new Branch(new
Node(10), new Node(20))), new Branch(new Node(20), new Node(40)));
On Wed, Jul 1, 2020 at 5:10 PM Bill Fly notifications@github.com wrote:
Dan, Java records are immutable? I visualize a BST node as a value, and a left and right node. I don’t see how to use a record for a node, because you add a node to a tree and then later add a node to the left or right subnode. Am I not looking at this correctly? Bill
Bill Fly Adjunct Instructor Brookhaven Campus 972.849.5137 [Dallas College Logo]
NEVERAGAIN
Caffeine-Based is a nickname term used to refer to any program written in Java. “When you have a good idea, and you’ve tried it and know it is going to work, go ahead and do it – because it is much easier to apologize later than it is to get permission”. Adm Grace Murray Hopper “The best things in life are often waiting for you at the exit ramp of your comfort zone”. Karen Salmansohn
From: Daniel Hinojosa notifications@github.com Reply-To: dhinojosa/state-of-java-2020 reply@reply.github.com Date: Wednesday, July 1, 2020 at 5:34 PM To: dhinojosa/state-of-java-2020 state-of-java-2020@noreply.github.com Cc: Bill Fly billfly@programmer.net, Author author@noreply.github.com Subject: Re: [dhinojosa/state-of-java-2020] More examples from webinar (#1)
Posting now. ;)
Instructions are on the readme
https://github.com/dhinojosa/jdk15-analysis
On Wed, Jul 1, 2020 at 3:55 PM Bill Fly notifications@github.com wrote:
Dan, I can’t figure out how to tie nodes together if Node and Branch are siblings.
From: Daniel Hinojosa notifications@github.com Reply-To: dhinojosa/state-of-java-2020 reply@reply.github.com Date: Wednesday, July 1, 2020 at 4:49 PM To: dhinojosa/state-of-java-2020 state-of-java-2020@noreply.github.com Cc: Bill Fly billfly@programmer.net, Author <author@noreply.github.com
Subject: Re: [dhinojosa/state-of-java-2020] More examples from webinar (#1)
I'll put them up. It was difficult because the sealed classes and records need JDK 15. My project was on JDK 14. That's why it was separate. Let me strategize. Glad you found the repo.
HTTP Client is here github.com/dhinojosa/http-client-study
On Wed, Jul 1, 2020 at 12:27 PM Bill Fly notifications@github.com wrote:
Would like to see more examples, such as Tree interface and permit and records. HttpClient. The examples you showed were very interesting and informative.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dhinojosa/state-of-java-2020/issues/1, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/AADEJBLZ4KRM6YAQL6BTTNDRZN52TANCNFSM4ONZA7YA
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub<
https://github.com/dhinojosa/state-of-java-2020/issues/1#issuecomment-652663433 , or unsubscribe<
https://github.com/notifications/unsubscribe-auth/AANQTYQCY27TNNR73KXFBTTRZOVNBANCNFSM4ONZA7YA
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/dhinojosa/state-of-java-2020/issues/1#issuecomment-652665613 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AADEJBOCW3A27NSTJYPTLVDRZOWERANCNFSM4ONZA7YA
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub< https://github.com/dhinojosa/state-of-java-2020/issues/1#issuecomment-652679064>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/AANQTYXV2UOC62B6Y3XAVGTRZO2YHANCNFSM4ONZA7YA
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dhinojosa/state-of-java-2020/issues/1#issuecomment-652689012, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADEJBLZKXX7DLAFLBD4R73RZO64XANCNFSM4ONZA7YA .
Would like to see more examples, such as Tree interface and permit and records. HttpClient. The examples you showed were very interesting and informative.