public void write(DataOutput out) throws IOException {
   out.writeBoolean(isNode);
   if (node != null) {
     node.write(out);
   } else {
     contribution.write(out);
   }
 }