# SimpleRobotRules.RobotRule (Crawler-commons 1.4 API)

Package crawlercommons.robots

## Class SimpleRobotRules.RobotRule

- java.lang.Object
- - crawlercommons.robots.SimpleRobotRules.RobotRule

All Implemented Interfaces:
  `Serializable`, `Comparable<SimpleRobotRules.RobotRule>`

Enclosing class:
  SimpleRobotRules

    public static class SimpleRobotRules.RobotRule
    extends Object
    implements Comparable<SimpleRobotRules.RobotRule>, Serializable

Single rule that maps from a path prefix to an allow flag.

See Also:
  Serialized Form

### Constructor Summary

Constructors
`RobotRule​(String prefix, boolean allow)` A allow/disallow rule: a path prefix or pattern and whether it is allowed or disallowed.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compareTo​(SimpleRobotRules.RobotRule o)`
`boolean` `equals​(Object obj)`
`String` `getPrefix()`
`int` `hashCode()`
`boolean` `isAllow()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### RobotRule

    public RobotRule​(String prefix,
                     boolean allow)

A allow/disallow rule: a path prefix or pattern and whether it is allowed or disallowed.

### Method Detail

#### isAllow

    public boolean isAllow()

#### getPrefix

    public String getPrefix()

#### compareTo

    public int compareTo​(SimpleRobotRules.RobotRule o)

Specified by:
  `compareTo` in interface `Comparable<SimpleRobotRules.RobotRule>`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals​(Object obj)

Overrides:
  `equals` in class `Object`