|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opennms.bb.common.filter.util.BBIPOctet
This class is responsible for parsing an individual octet from an IPLIKE ip string. This octet can be a single number, a * (which gets transformed into the range 0-255), a range consisting of a low value seperated from a high value with a dash, or a combination of the above seperated by a comma (note: * will only ever appear by itself in a range).
Field Summary | |
private static int |
HIGH_VALUE
This is the highest value a member of a range octet can be. |
private static int |
LOW_VALUE
This is the lowest value a member of a range octet can be. |
private Vector |
ranges
This vector will hold the list of ranges found in an octet. |
Constructor Summary | |
BBIPOctet(String anOctet)
A constructor that parses an octet into its individual ranges. |
Method Summary | |
Range |
getRange(int index)
This method returns the Range object at a given index of an octet. |
private String |
getRangeString(int index)
This method reconstructs a range into a string representation |
int |
numRanges()
This method returns the number of ranges found in the octet |
private void |
parseRange(String rangeString)
This method will parse an indiviual range (that was delimited by commas) and store it in the ranges vector. |
String |
toString()
This method reconstructs a representation of the original octet with all ranges. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private Vector ranges
private static final int LOW_VALUE
private static final int HIGH_VALUE
Constructor Detail |
public BBIPOctet(String anOctet)
String
- anOctet, the octet string to be parsedMethod Detail |
private String getRangeString(int index)
int
- index, the index of the range to reconstructprivate void parseRange(String rangeString)
String
- rangeString, the range to be parsedpublic int numRanges()
public Range getRange(int index)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |