net.sf.jsimpletools.utils.StringGeneratorNode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsimpletools-core Show documentation
Show all versions of jsimpletools-core Show documentation
A simple tool box to assist in coding tests in Java. Core module.
/*
* #%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;
}
}