Tabnine Logo
ValueIterator
Code IndexAdd Tabnine to your IDE (free)

How to use
ValueIterator
in
com.mucommander.commons.conf

Best Java code snippets using com.mucommander.commons.conf.ValueIterator (Showing top 14 results out of 315)

origin: mucommander/mucommander

/**
 * Returns the next value in the iterator as a float.
 * @return                        the next value in the iterator as a float.
 * @throws NoSuchElementException if the iteration has no more elements.
 * @throws NumberFormatException  if the value cannot be cast to a float.
 */
public float nextFloatValue() {
  return ConfigurationSection.getFloatValue(nextValue());
}
origin: mucommander/mucommander

/**
 * Returns a {@link ValueIterator} on the list.
 * @return a {@link ValueIterator} on the list.
 */
public ValueIterator valueIterator() {
  return new ValueIterator(iterator());
}
origin: mucommander/mucommander

/**
 * Tests the {@link ValueIterator#nextValue()} method.
 * @param values test data.
 */
@Override
protected void testStringValues(ValueList values) {
  ValueIterator iterator;
  iterator = values.valueIterator();
  for(int i = 0; i < 7; i++) {
    assert iterator.hasNext();
    assert Integer.toString(i + 1).equals(iterator.nextValue());
  }
  assert !iterator.hasNext();
}
origin: mucommander/mucommander

/**
 * Tests the {@link ValueIterator#nextIntegerValue()} method.
 * @param values test data.
 */
@Override
protected void testIntegerValues(ValueList values) {
  ValueIterator iterator;
  iterator = values.valueIterator();
  for(int i = 0; i < 7; i++) {
    assert iterator.hasNext();
    assert i + 1 == iterator.nextIntegerValue();
  }
  assert !iterator.hasNext();
}
origin: mucommander/mucommander

/**
 * Tests the {@link ValueIterator#nextDoubleValue()} method.
 * @param values test data.
 */
@Override
protected void testDoubleValues(ValueList values) {
  ValueIterator iterator;
  iterator = values.valueIterator();
  for(int i = 0; i < 7; i++) {
    assert iterator.hasNext();
    assert i + 1.5 == iterator.nextDoubleValue();
  }
}
origin: mucommander/mucommander

/**
 * Tests the {@link ValueIterator#nextBooleanValue()} method.
 * @param values test data.
 */
@Override
protected void testBooleanValues(ValueList values) {
  ValueIterator iterator;
  iterator = values.valueIterator();
  for(int i = 0; i < 7; i++) {
    assert iterator.hasNext();
    assert (i % 2 == 0) == iterator.nextBooleanValue();
  }
}
origin: mucommander/mucommander

/**
 * Tests the {@link ValueIterator#nextFloatValue()} method.
 * @param values test data.
 */
@Override
protected void testFloatValues(ValueList values) {
  ValueIterator iterator;
  iterator = values.valueIterator();
  for(int i = 0; i < 7; i++) {
    assert iterator.hasNext();
    assert i + 1.5 == iterator.nextFloatValue();
  }
}
origin: mucommander/mucommander

/**
 * Tests the {@link ValueIterator#nextLongValue()} method.
 * @param values test data.
 */
@Override
protected void testLongValues(ValueList values) {
  ValueIterator iterator;
  iterator = values.valueIterator();
  for(int i = 0; i < 7; i++) {
    assert iterator.hasNext();
    assert i + 1 == iterator.nextLongValue();
  }
}
origin: mucommander/mucommander

assert iterator.hasNext();
testStringValues(iterator.nextListValue(separator));
assert iterator.hasNext();
testIntegerValues(iterator.nextListValue(separator));
assert iterator.hasNext();
testLongValues(iterator.nextListValue(separator));
assert iterator.hasNext();
testFloatValues(iterator.nextListValue(separator));
assert iterator.hasNext();
testDoubleValues(iterator.nextListValue(separator));
assert iterator.hasNext();
testBooleanValues(iterator.nextListValue(separator));
assert !iterator.hasNext();
origin: mucommander/mucommander

/**
 * Returns the next value in the iterator as a double.
 * @return                        the next value in the iterator as a double.
 * @throws NoSuchElementException if the iteration has no more elements.
 * @throws NumberFormatException  if the value cannot be cast to a double.
 */
public double nextDoubleValue() {
  return ConfigurationSection.getDoubleValue(nextValue());
}
origin: mucommander/mucommander

  /**
   * Returns the next value in the iterator as a {@link ValueList}.
   * @param  separator              stirng used to tokenise the next value.
   * @return                        the next value in the iterator as a {@link ValueList}.
   * @throws NoSuchElementException if the iteration has no more elements.
   */
  public ValueList nextListValue(String separator) {
    return ConfigurationSection.getListValue(nextValue(), separator);
  }
}
origin: mucommander/mucommander

/**
 * Returns the next value in the iterator as a boolean.
 * @return                        the next value in the iterator as a boolean.
 * @throws NoSuchElementException if the iteration has no more elements.
 */
public boolean nextBooleanValue() {
  return ConfigurationSection.getBooleanValue(nextValue());
}
origin: mucommander/mucommander

/**
 * Returns the next value in the iterator as a integer.
 * @return                        the next value in the iterator as a integer.
 * @throws NoSuchElementException if the iteration has no more elements.
 * @throws NumberFormatException  if the value cannot be cast to an integer.
 */
public int nextIntegerValue() {
  return ConfigurationSection.getIntegerValue(nextValue());
}
origin: mucommander/mucommander

/**
 * Returns the next value in the iterator as a long.
 * @return                        the next value in the iterator as a long.
 * @throws NoSuchElementException if the iteration has no more elements.
 * @throws NumberFormatException  if the value cannot be cast to a long.
 */
public long nextLongValue() {
  return ConfigurationSection.getLongValue(nextValue());
}
com.mucommander.commons.confValueIterator

Javadoc

Iterator with support for value casting.

Instances of this class can only be retrieved through ValueList#valueIterator().

Most used methods

  • nextValue
    Returns the next value in the iterator as a string.
  • <init>
    Creates a new ValueIterator wrapping the specified iterator.
  • hasNext
    Returns true if the iteration has more elements. (In other words, returns true if next would return
  • nextBooleanValue
    Returns the next value in the iterator as a boolean.
  • nextDoubleValue
    Returns the next value in the iterator as a double.
  • nextFloatValue
    Returns the next value in the iterator as a float.
  • nextIntegerValue
    Returns the next value in the iterator as a integer.
  • nextListValue
    Returns the next value in the iterator as a ValueList.
  • nextLongValue
    Returns the next value in the iterator as a long.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • putExtra (Intent)
  • onRequestPermissionsResult (Fragment)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now