public class RobotExclusionSet
extends java.util.AbstractSet<java.lang.String>
Constructor and Description |
---|
RobotExclusionSet()
Constructs an empty set.
|
RobotExclusionSet(java.lang.String site)
Constructs a set containing the paths in the robots.txt file
for this site.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(java.lang.String o) |
boolean |
contains(java.lang.String path)
Checks to see if a path is prohibited by this set.
|
java.util.Iterator<java.lang.String> |
iterator() |
static void |
main(java.lang.String[] args)
For testing only.
|
int |
size() |
addAll, clear, contains, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString
public RobotExclusionSet()
public RobotExclusionSet(java.lang.String site)
site
- The name of the sitepublic int size()
size
in interface java.util.Collection<java.lang.String>
size
in interface java.util.Set<java.lang.String>
size
in class java.util.AbstractCollection<java.lang.String>
public boolean add(java.lang.String o)
add
in interface java.util.Collection<java.lang.String>
add
in interface java.util.Set<java.lang.String>
add
in class java.util.AbstractCollection<java.lang.String>
public java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>
iterator
in interface java.util.Collection<java.lang.String>
iterator
in interface java.util.Set<java.lang.String>
iterator
in class java.util.AbstractCollection<java.lang.String>
public boolean contains(java.lang.String path)
path
- String
object representing the path.true
iff. o
is a
String
object, o
is not
null
, and for each element e in this set
!o.startsWith(e)
.public static void main(java.lang.String[] args)