internal virtual IndexEntryUpdate <IndexDescriptor>[] SomeUpdatesWithDuplicateValues(RandomRule randomRule) { IEnumerator <Value> valueIterator = new RandomValueGenerator(this, randomRule.RandomValues(), SupportedTypes(), FractionDuplicates()); Value[] someValues = new Value[N_VALUES]; for (int i = 0; i < N_VALUES; i++) { //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: someValues[i] = valueIterator.next(); } return(GenerateAddUpdatesFor(ArrayUtils.addAll(someValues, someValues))); }
private IndexEntryUpdate <IndexDescriptor>[] SomeUpdates(RandomRule random, ValueType[] types, double fractionDuplicates) { RandomValueGenerator valueGenerator = new RandomValueGenerator(this, random.RandomValues(), types, fractionDuplicates); RandomUpdateGenerator randomUpdateGenerator = new RandomUpdateGenerator(this, valueGenerator); //noinspection unchecked IndexEntryUpdate <IndexDescriptor>[] result = new IndexEntryUpdate[N_VALUES]; for (int i = 0; i < N_VALUES; i++) { //JAVA TO C# CONVERTER TODO TASK: Java iterators are only converted within the context of 'while' and 'for' loops: result[i] = randomUpdateGenerator.Next(); } return(result); }
internal virtual IEnumerator <IndexEntryUpdate <IndexDescriptor> > RandomUpdateGenerator(RandomRule random, ValueType[] types) { IEnumerator <Value> valueIterator = new RandomValueGenerator(this, random.RandomValues(), types, FractionDuplicates()); return(new RandomUpdateGenerator(this, valueIterator)); }