public boolean setNewValue(int depth, int value) {
      if(isFull()) {
         return false;
      }
      if(depth==1) {
         if(o0==null) {
            set0(new HuffmanNode(this, value));
            return true;
         }
         else if(o1==null) {
            set1(new HuffmanNode(this, value));
            return true;
         }
         else {
            return false;
         }
      }
      else {
         return get0().setNewValue(depth-1, value)?
            true:
            get1().setNewValue(depth-1, value);
      }
   }