title: Setters and Getters in Scala Trait?
body: <p>In Java I would sometimes define an interface for ensuring that classes have "setters" and "getters". </p>
  
  <p>For example, if I have a node in a tree I might define interface such as:</p>
  
  <pre><code>public interface Node { 
  
      Node getLeft();
  
      void setLeft(Node node);
  
      Node getRight();   
  
      void setRight(Node node);
  
      int getValue();
  }
  </code></pre>
  
  <p>and then my nodes would implement this interface:</p>
  
  <pre><code> public Node2D implements Node{
       //implements all of Node's methods along with getters
       // and setters
   }
  </code></pre>
  
  <p>Would I do the same in Scala, or is it done in a different way?</p>