ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.vci.server.query.refquery.objects;
 
public class Sequence {
    private String current = "a_0";
 
    public Sequence(String first) {
        this.current = first;
    }
 
    public String getNextSequence() {
        char first = current.toCharArray()[0];
        char second = current.toCharArray()[2];
        int b = (int) second;
        int a = (int) first;
        b++;
        if (b == 58) {
            b = 48;
            a++;
            if (a == 123) {
                a = 97;
            }
            first = (char) a;
        }
        second = (char) b;
        StringBuffer s = new StringBuffer();
        s.append(first);
        s.append("_");
        s.append(second);
        current = s.toString();
        return current;
    }
    
    public void setSequence(String seq) {
        this.current = seq;
    }
    
    
    public String getSequence() {
        return this.current;
    }
}