net.sf.javagimmicks.collections.transformer.TransformingNavigableSet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gimmicks Show documentation
Show all versions of gimmicks Show documentation
Utility classes, APIs and tools for Java
package net.sf.javagimmicks.collections.transformer;
import java.util.Iterator;
import java.util.NavigableSet;
import net.sf.javagimmicks.util.Function;
class TransformingNavigableSet
extends TransformingSortedSet
implements NavigableSet
{
/**
* @deprecated Use TranformerUtils.decorate() instead
*/
@Deprecated
public TransformingNavigableSet(NavigableSet set, Function transformer)
{
super(set, transformer);
}
public T ceiling(T e)
{
throw new UnsupportedOperationException();
}
public Iterator descendingIterator()
{
return TransformerUtils.decorate(getNavigableSet().descendingIterator(), getTransformerFunction());
}
public NavigableSet descendingSet()
{
return TransformerUtils.decorate(getNavigableSet().descendingSet(), getTransformerFunction());
}
public T floor(T e)
{
throw new UnsupportedOperationException();
}
public NavigableSet headSet(T toElement, boolean inclusive)
{
throw new UnsupportedOperationException();
}
public T higher(T e)
{
throw new UnsupportedOperationException();
}
public T lower(T e)
{
throw new UnsupportedOperationException();
}
public T pollFirst()
{
F first = getNavigableSet().pollFirst();
return first != null ? transform(first) : null;
}
public T pollLast()
{
F last = getNavigableSet().pollLast();
return last != null ? transform(last) : null;
}
public NavigableSet subSet(T fromElement, boolean fromInclusive,
T toElement, boolean toInclusive)
{
throw new UnsupportedOperationException();
}
public NavigableSet tailSet(T fromElement, boolean inclusive)
{
throw new UnsupportedOperationException();
}
protected NavigableSet getNavigableSet()
{
return (NavigableSet)_internalSet;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy