List of usage examples for org.apache.commons.collections.iterators SingletonIterator SingletonIterator
public SingletonIterator(Object object, boolean removeAllowed)
SingletonIterator
optionally choosing if remove
is a permitted operation. From source file:org.bhave.sweeper.impl.SingleValueSweep.java
@SuppressWarnings("unchecked") @Override//from w w w . j av a 2 s . c om public Iterator<Configuration> iterator() { SingletonIterator it = new SingletonIterator(value, false); TransformIterator itConfig = new TransformIterator(it, new ConfigurationTranformer(param)); return itConfig; }
From source file:org.eclipse.smila.datamodel.id.impl.KeyImpl.java
/** * {@inheritDoc}/* w w w . j a v a 2s . co m*/ * * @see org.eclipse.smila.datamodel.id.Key#getKeyNames() */ public Iterator<String> getKeyNames() { if (_compositeKey == null) { if (_simpleKeyName == null) { return EmptyIterator.INSTANCE; } else { return new SingletonIterator(_simpleKeyName, false); } } else { return _compositeKey.keySet().iterator(); } }