Exemplo n.º 1
0
  @Override
  public Data getNumberOfLinksInChain() {
    // TODO: rewrite this using user-defined data & functions
    int numberOfLinks = 0;
    Data next = getNext();

    while (notAtLinkEnd(next)) {
      numberOfLinks++;
      next = next.getNext();
    }
    ;

    Integer numberOfLinksInChain = new Integer(numberOfLinks);
    return Data.Factory.create(numberOfLinksInChain.toString());
  }
Exemplo n.º 2
0
 public BaseChain() {
   // TODO: cleanup
   super(Data.Factory.createTimestamped().getValue());
 }