All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.jsimpletools.utils.StringGeneratorNode Maven / Gradle / Ivy

There is a newer version: 0.3.1
Show newest version
/*
 * #%L
 * jSimpleTools
 * %%
 * Copyright (C) 2011 - 2015 Eric-Karl Matteau 
 * %%
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public
 * License along with this program.  If not, see
 * .
 * #L%
 */
package net.sf.jsimpletools.utils;

class StringGeneratorNode {

    private char[] values;
    private StringGeneratorNode next;
    private int minRepeat = 1;
    private int maxRepeat = 1;

    StringGeneratorNode createNext() {
        next = new StringGeneratorNode();
        return next;
    }

    public void setValues(char[] values) {
        this.values = values;
    }

    public int getValueSize() {
        if (values == null) {
            return 0;
        }
        return values.length;
    }

    public char getValueAt(int index) {
        return values[index];
    }

    public StringGeneratorNode getNext() {
        return next;
    }

    public void setRepeatCount(int minRepeat, int maxRepeat) {
        this.minRepeat = minRepeat;
        this.maxRepeat = maxRepeat;
    }

    public int getMinRepeat() {
        return minRepeat;
    }

    public int getMaxRepeat() {
        return maxRepeat;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy