Top Description Fields Constructors Methods
org.eclipse.jetty.http.pathmap

public Class PathSpecSet

extends AbstractSet<String>
implements Predicate<String>
Class Inheritance
All Implemented Interfaces
java.util.function.Predicate
Imports
java.util.AbstractSet, .Iterator, .Objects, java.util.function.Predicate

A Set of PathSpec strings.

Used by org.eclipse.jetty.util.IncludeExclude logic

Field Summary

Modifier and TypeField and Description
private final PathMappings<Boolean>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
add(PathSpec
element to be added to this set
pathSpec
)

Overrides java.util.AbstractCollection.add.

Implements java.util.Set.add, java.util.Collection.add.

Adds the specified element to this set if it is not already present (optional operation).

public boolean
add(String
element to be added to this set
s
)

Overrides java.util.AbstractCollection.add.

Implements java.util.Set.add, java.util.Collection.add.

Adds the specified element to this set if it is not already present (optional operation).

private PathSpec
public void
clear()

Overrides java.util.AbstractCollection.clear.

Implements java.util.Set.clear, java.util.Collection.clear.

Removes all of the elements from this set (optional operation).

public Iterator<String>
iterator()

Implements abstract java.util.AbstractCollection.iterator.

Implements java.util.Set.iterator, java.util.Collection.iterator.

Returns an iterator over the elements in this set.

public boolean
remove(PathSpec pathSpec)

public boolean
remove(Object
object to be removed from this set, if present
o
)

Overrides java.util.AbstractCollection.remove.

Implements java.util.Set.remove, java.util.Collection.remove.

Removes the specified element from this set if it is present (optional operation).

public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Set.size, java.util.Collection.size.

Returns the number of elements in this set (its cardinality).

public boolean
test(String
the input argument
s
)

Implements java.util.function.Predicate.test.

Evaluates this predicate on the given argument.

Inherited from java.util.AbstractSet:
equalshashCoderemoveAll

Field Detail

specsback to summary
private final PathMappings<Boolean> specs

Constructor Detail

PathSpecSetback to summary
public PathSpecSet()

Method Detail

addback to summary
public boolean add(PathSpec pathSpec)

Overrides java.util.AbstractCollection.add.

Implements java.util.Set.add, java.util.Collection.add.

Doc from java.util.Set.add.

Adds the specified element to this set if it is not already present (optional operation). More formally, adds the specified element e to this set if the set contains no element e2 such that Objects.equals(e, e2). If this set already contains the element, the call leaves the set unchanged and returns false. In combination with the restriction on constructors, this ensures that sets never contain duplicate elements.

The stipulation above does not imply that sets must accept all elements; sets may refuse to add any particular element, including null, and throw an exception, as described in the specification for Collection.add. Individual set implementations should clearly document any restrictions on the elements that they may contain.

Parameters
pathSpec:PathSpec

element to be added to this set

Returns:boolean

true if this set did not already contain the specified element

addback to summary
public boolean add(String s)

Overrides java.util.AbstractCollection.add.

Implements java.util.Set.add, java.util.Collection.add.

Doc from java.util.Set.add.

Adds the specified element to this set if it is not already present (optional operation). More formally, adds the specified element e to this set if the set contains no element e2 such that Objects.equals(e, e2). If this set already contains the element, the call leaves the set unchanged and returns false. In combination with the restriction on constructors, this ensures that sets never contain duplicate elements.

The stipulation above does not imply that sets must accept all elements; sets may refuse to add any particular element, including null, and throw an exception, as described in the specification for Collection.add. Individual set implementations should clearly document any restrictions on the elements that they may contain.

Parameters
s:String

element to be added to this set

Returns:boolean

true if this set did not already contain the specified element

Annotations
@Override
asPathSpecback to summary
private PathSpec asPathSpec(Object o)
clearback to summary
public void clear()

Overrides java.util.AbstractCollection.clear.

Implements java.util.Set.clear, java.util.Collection.clear.

Doc from java.util.Set.clear.

Removes all of the elements from this set (optional operation). The set will be empty after this call returns.

Annotations
@Override
iteratorback to summary
public Iterator<String> iterator()

Implements abstract java.util.AbstractCollection.iterator.

Implements java.util.Set.iterator, java.util.Collection.iterator.

Doc from java.util.Set.iterator.

Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee).

Returns:Iterator<String>

an iterator over the elements in this set

Annotations
@Override
removeback to summary
public boolean remove(PathSpec pathSpec)
removeback to summary
public boolean remove(Object o)

Overrides java.util.AbstractCollection.remove.

Implements java.util.Set.remove, java.util.Collection.remove.

Doc from java.util.Set.remove.

Removes the specified element from this set if it is present (optional operation). More formally, removes an element e such that Objects.equals(o, e), if this set contains such an element. Returns true if this set contained the element (or equivalently, if this set changed as a result of the call). (This set will not contain the element once the call returns.)

Parameters
o:Object

object to be removed from this set, if present

Returns:boolean

true if this set contained the specified element

Annotations
@Override
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.Set.size, java.util.Collection.size.

Doc from java.util.Set.size.

Returns the number of elements in this set (its cardinality). If this set contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this set (its cardinality)

Annotations
@Override
testback to summary
public boolean test(String s)

Implements java.util.function.Predicate.test.

Doc from java.util.function.Predicate.test.

Evaluates this predicate on the given argument.

Parameters
s:String

the input argument

Returns:boolean

true if the input argument matches the predicate, otherwise false

Annotations
@Override