KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thoughtworks > xstream > core > SequenceGenerator


1 package com.thoughtworks.xstream.core;
2
3 public class SequenceGenerator implements ReferenceByIdMarshaller.IDGenerator {
4
5     private int counter;
6
7     public SequenceGenerator(int startsAt) {
8         this.counter = startsAt;
9     }
10
11     public String JavaDoc next() {
12         return String.valueOf(counter++);
13     }
14
15 }
16
Popular Tags