public char Random() { if (length == 0) { return(CharUtils.ToChar(0)); } return(items[MathUtils.Random(0, length - 1)]); }
public char Get(int index) { if (index >= length) { return(CharUtils.ToChar(0)); } return(items[index]); }
public char NextChar() { if (Eof()) { return(CharUtils.ToChar(-1)); } return(context.CharAt(poistion)); }
public char ConsumeChar() { if (poistion < context.Length()) { char consumedChar = context.CharAt(poistion); poistion++; return(consumedChar); } else { return(CharUtils.ToChar(-1)); } }
public char[] RandomArrays() { if (length == 0) { return(new char[0]); } char v = CharUtils.ToChar(-1); char[] newArrays = CollectionUtils.CopyOf(items, length); for (int i = 0; i < length; i++) { v = Random(); for (int j = 0; j < i; j++) { if (newArrays[j] == v) { v = Random(); j = -1; } } newArrays[i] = v; } return(newArrays); }