Hello in the Javaranch.
I almost have a working Huffman algorithm but I'm having trouble figuring our how to implement it / or make it work together with the Code class
when you look at the generateHuffmanCode method.
1: An instance of the Huffman class: new HuffmanEncoder("CodeRanch Rocks!");
2: Make the Huffman class a utility class: HuffmanEncoder.encode("CodeRanch Rocks!");
The two are mutually exclusive because you never instantiate a utility class and an ordinary concrete class often doesn't declare any static methods. You design test and produce your Huffman class and get it working correctly. Then you use it as shwon above. You appear to have taken the approach of No 2, so you shouldn't instantiate your Huffman class, so it should have a private constructor for reasons explained here in the JLS (=Java® Language specification).
Why are you using an Integer for frequency (line 14) when you previously defined it as a double?
Why are you passing a Map and a Node to the encode() method? That doesn't look correct. Surely you should have worked out the frequencies beforehand and you should be creating the node in that method. Consider a private method which will receive a partially encoded text and such nodes. If you make the Node class a top‑level class, make sure to keep it hidden inside that package and don't let any code using it access it. So use the Huffman class only from outside that package. If anybody passes null, don't wait for something to go wrong: throw an exception immeidately you detect the null.