|
Cisco Systems, Inc. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.pcube.apps.engage.common.ArrayElement
com.pcube.apps.engage.common.ListItem
com.pcube.apps.engage.policy.IPListItem
public class IPListItem
An item in an IPList/IPRangeList. The item has an ip address and a mask.
Mask 32 is considered an ip address. If stating a mask X, the (32 - X) least
significant bits of the ip range must be 0, otherwise the ipListItem is
considered illegal.
| Constructor Summary | |
|---|---|
IPListItem()
IPListItem Constructor. |
|
IPListItem(long newIp,
byte newMask)
IPListItem Constructor. |
|
IPListItem(java.lang.String newStringIp,
byte newMask)
IPListItem Constructor. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
int |
compareTo(java.lang.Object o)
|
void |
fromStream(java.io.BufferedReader in,
Formatter f)
Method fromStream |
long |
getIp()
Gets this IPListItem's ip. |
java.lang.String |
getIpAsString()
Gets this IPListItem's ip's String representation. |
byte |
getMask()
Gets this IPListItem's mask. |
static boolean |
isIpRangeLegal(long ip,
byte mask)
Checks if an ip and a mask are consistent. |
void |
set(ListItem parm1)
Sets this IPListItem to resemble another specific IPListItem. |
void |
toStream(java.io.PrintStream out,
Formatter f)
Method toStream |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public IPListItem()
public IPListItem(long newIp,
byte newMask)
newIp - the ipnewMask - the mask
java.lang.IllegalArgumentException - if the mask and ip are not consistent
public IPListItem(java.lang.String newStringIp,
byte newMask)
throws java.lang.NumberFormatException
newStringIp - the String representation of the ipnewMask - the mask
java.lang.IllegalArgumentException - if the mask and ip are not consistent
java.lang.NumberFormatException - if the String representation is erroneous| Method Detail |
|---|
public static boolean isIpRangeLegal(long ip,
byte mask)
throws java.lang.IllegalArgumentException
ip - the ipmask - the mask
java.lang.IllegalArgumentExceptionpublic java.lang.Object clone()
clone in class ListItemListItem.clone()public int compareTo(java.lang.Object o)
compareTo in interface java.lang.ComparablecompareTo in class ListItemListItem.compareTo(java.lang.Object)
public void fromStream(java.io.BufferedReader in,
Formatter f)
throws ImportExportException
Formattable
fromStream in interface FormattableImportExportExceptionFormattable.fromStream(java.io.BufferedReader,
com.pcube.apps.engage.common.Formatter)public long getIp()
public java.lang.String getIpAsString()
public byte getMask()
public void set(ListItem parm1)
parm1 - the IPListItem to resemble to.
public void toStream(java.io.PrintStream out,
Formatter f)
Formattable
toStream in interface FormattableFormattable.toStream(java.io.PrintStream,
com.pcube.apps.engage.common.Formatter)public java.lang.String toString()
toString in class ListItemListItem.toString()
|
Cisco Systems, Inc. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||