/** * 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()); }
/** * Returns the value found at the specified index of the list as a boolean. * @param index index of the value to retrieve. * @return the value found at the specified index of the list as a boolean. */ public boolean booleanValueAt(int index) { return ConfigurationSection.getBooleanValue(valueAt(index)); }
/** * Returns the value of the specified variable as a long. * @param name fully qualified name of the variable whose value should be retrieved. * @return the variable's value if set, <code>0</code> otherwise. * @throws NumberFormatException if the variable's value cannot be cast to a long. * @see #setVariable(String,long) * @see #getVariable(String,long) */ public long getLongVariable(String name) { return ConfigurationSection.getLongValue(getVariable(name)); }
/** * Returns the value found at the specified index of the list as an integer. * @param index index of the value to retrieve. * @return the value found at the specified index of the list as an integer. * @throws NumberFormatException if the value cannot be cast to an integer. */ public int integerValueAt(int index) { return ConfigurationSection.getIntegerValue(valueAt(index)); }
/** * Returns the value of the specified variable as a {@link ValueList}. * @param name fully qualified name of the variable whose value should be retrieved. * @param separator character used to split the variable's value into a list. * @return the variable's value if set, <code>null</code> otherwise. * @see #setVariable(String,List,String) * @see #getVariable(String,List,String) */ public ValueList getListVariable(String name, String separator) { return ConfigurationSection.getListValue(getVariable(name), separator); }
/** * Returns the value found at the specified index of the list as a float. * @param index index of the value to retrieve. * @return the value found at the specified index of the list as a float. * @throws NumberFormatException if the value cannot be cast to a float. */ public float floatValueAt(int index) { return ConfigurationSection.getFloatValue(valueAt(index)); }
/** * Returns the value found at the specified index of the list as a {@link ValueList}. * @param index index of the value to retrieve. * @param separator string used to split the value into tokens. * @return the value found at the specified index of the list as a {@link ValueList}. */ public ValueList listValueAt(int index, String separator) { return ConfigurationSection.getListValue(valueAt(index), separator); }
/** * Returns the value of the specified variable as an integer. * @param name fully qualified name of the variable whose value should be retrieved. * @return the variable's value if set, <code>0</code> otherwise. * @throws NumberFormatException if the variable's value cannot be cast to an integer. * @see #setVariable(String,int) * @see #getVariable(String,int) */ public int getIntegerVariable(String name) { return ConfigurationSection.getIntegerValue(getVariable(name)); }
/** * Returns the value of the specified variable as a float. * @param name fully qualified name of the variable whose value should be retrieved. * @return the variable's value if set, <code>0</code> otherwise. * @throws NumberFormatException if the variable's value cannot be cast to a float. * @see #setVariable(String,float) * @see #getVariable(String,float) */ public float getFloatVariable(String name) { return ConfigurationSection.getFloatValue(getVariable(name)); }
/** * Deletes the specified variable from the configuration. * <p> * If the variable was set, a configuration {@link ConfigurationEvent event} will be passed to * all registered LISTENERS. * </p> * @param name name of the variable to remove. * @return the variable's old value, or <code>0</code> if it wasn't set. */ public int removeIntegerVariable(String name) { return ConfigurationSection.getIntegerValue(removeVariable(name)); }
/** * Deletes the specified variable from the configuration. * <p> * If the variable was set, a configuration {@link ConfigurationEvent event} will be passed to * all registered LISTENERS. * </p> * @param name name of the variable to remove. * @return the variable's old value, or <code>0</code> if it wasn't set. */ public double removeDoubleVariable(String name) { return ConfigurationSection.getDoubleValue(removeVariable(name)); }
/** * 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()); }
/** * Returns the value found at the specified index of the list as a long. * @param index index of the value to retrieve. * @return the value found at the specified index of the list as a long. * @throws NumberFormatException if the value cannot be cast to a long. */ public long longValueAt(int index) { return ConfigurationSection.getLongValue(valueAt(index)); }
/** * Returns the value of the specified variable as a double. * @param name fully qualified name of the variable whose value should be retrieved. * @return the variable's value if set, <code>0</code> otherwise. * @throws NumberFormatException if the variable's value cannot be cast to a double. * @see #setVariable(String,double) * @see #getVariable(String,double) */ public double getDoubleVariable(String name) { return ConfigurationSection.getDoubleValue(getVariable(name)); }
/** * Returns the value of the specified variable as a boolean. * @param name fully qualified name of the variable whose value should be retrieved. * @return the variable's value if set, <code>false</code> otherwise. * @see #setVariable(String,boolean) * @see #getVariable(String,boolean) */ public boolean getBooleanVariable(String name) { return ConfigurationSection.getBooleanValue(getVariable(name)); }
/** * Deletes the specified variable from the configuration. * <p> * If the variable was set, a configuration {@link ConfigurationEvent event} will be passed to * all registered LISTENERS. * </p> * @param name name of the variable to remove. * @return the variable's old value, or <code>0</code> if it wasn't set. */ public float removeFloatVariable(String name) { return ConfigurationSection.getFloatValue(removeVariable(name)); }
/** * Writes the configuration data to the specified builder. * @param builder object that will receive configuration building messages. * @throws ConfigurationException if any error occurs while going through the configuration tree. */ public void write(ConfigurationBuilder builder) throws ConfigurationException { builder.startConfiguration(); build(builder, root); builder.endConfiguration(); }
/** * Returns a configuration explorer on the test section. * @return a configuration explorer on the test section. */ protected ConfigurationExplorer getExplorer() { return new ConfigurationExplorer(conf.getRoot()); }
/** * Returns an instance of {@link BufferedConfigurationExplorer}. * @return an instance of {@link BufferedConfigurationExplorer}. */ @Override protected ConfigurationExplorer getExplorer() { return new BufferedConfigurationExplorer(conf.getRoot()); }