01: /*
02: * Copyright (C) 2004 Joe Walnes.
03: * Copyright (C) 2006, 2007 XStream Committers.
04: * All rights reserved.
05: *
06: * The software in this package is published under the terms of the BSD
07: * style license a copy of which has been included with this distribution in
08: * the LICENSE.txt file.
09: *
10: * Created on 16. March 2004 by Joe Walnes
11: */
12: package com.thoughtworks.xstream.core;
13:
14: public class SequenceGenerator implements
15: ReferenceByIdMarshaller.IDGenerator {
16:
17: private int counter;
18:
19: public SequenceGenerator(int startsAt) {
20: this .counter = startsAt;
21: }
22:
23: public String next() {
24: return String.valueOf(counter++);
25: }
26:
27: }
|