Package org.jgrapes.http
Class ResourcePattern.PathSpliterator
- All Implemented Interfaces:
Spliterator<String>
- Enclosing class:
ResourcePattern
public static class ResourcePattern.PathSpliterator
extends Spliterators.AbstractSpliterator<String>
Returns the segments of the path.
If the path starts with a slash, an empty string is returned as first segment. If the path ends with a slash, an empty string is returned as final segment.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.Spliterator
Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,
T_CONS, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> -
Field Summary
Fields inherited from interface java.util.Spliterator
CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED
-
Constructor Summary
ConstructorDescriptionPathSpliterator
(String path) Creates a new spliterator for the given path, using “/” as path separator.PathSpliterator
(String path, String delimiters) Creates a new spliterator for the given path, using the characters from delimiters as seperators. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new stream for the given path, using “/” as path separator.Creates a new stream for the given path, using the characters from delimiters as seperators.boolean
tryAdvance
(Consumer<? super String> consumer) Methods inherited from class java.util.Spliterators.AbstractSpliterator
characteristics, estimateSize, trySplit
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Spliterator
forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics
-
Constructor Details
-
PathSpliterator
Creates a new spliterator for the given path, using “/” as path separator.- Parameters:
path
- the path
-
PathSpliterator
Creates a new spliterator for the given path, using the characters from delimiters as seperators.- Parameters:
path
- the pathdelimiters
- the delimiters
-
-
Method Details
-
stream
Creates a new stream for the given path, using “/” as path separator.- Parameters:
path
- the path
-
stream
Creates a new stream for the given path, using the characters from delimiters as seperators.- Parameters:
path
- the pathdelimiters
- the delimiters
-
tryAdvance
-