The Java version was ported from C# in 2016. The port of the full Calculus class library took only a week. [User:NNcNannara|NNcNannara]] (talk) 10:20, 11 July 2016 (UTC)

The abbreviated version of Java on the main page will suffer in performance just like the C++ version on the main page - see C++ Talk.

The Java implementation of AVL Trees is a bit different to the C# version in that references to references are not available. This means that functions like RotateLeft and RotateRight return the new node rather than the function updating the reference for you. It is only a cosmetic change to the code. NNcNannara (talk) 11:25, 16 July 2016 (UTC)

AVL Disk can be implemented in Java (i.e. AVL Databases). There are 12 databases in Calculus. Strangely enough, all 12 databases use the same basic node type on disk. The definition of that node type is shown below.

<lang Java> public class Node

   {
       public long Left;
       public long Right;
       public long Parent;
       public long Key;
       public State Balance;
       public Node()
       {
           Left = 0;
           Right = 0;
           Parent = 0;
           Balance = State.Header;
           Key = 0;
       }
       
       public Node(long p)
       {
           Left = 0;
           Right = 0;
           Parent = p;
           Balance = State.Balanced;
           Key = 0;
       }
       public Boolean IsHeader ()  { return Balance == State.Header; }
   }

</lang>

Return to "AVL tree/Java" page.