Package org.batfish.datamodel
Class IpWildcard
java.lang.Object
org.batfish.datamodel.IpWildcard
- All Implemented Interfaces:
Serializable,Comparable<IpWildcard>
@ParametersAreNonnullByDefault
public final class IpWildcard
extends Object
implements Serializable, Comparable<IpWildcard>
An IP wildcard consisting of a IP address and a wildcard (also expressed as an IP address)
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintbooleancontainsIp(Ip ip) static IpWildcardstatic IpWildcardbooleangetIp()longgetMask()longinthashCode()booleanintersects(IpWildcard other) static IpWildcardipWithWildcardMask(Ip address, long wildcardMask) static IpWildcardipWithWildcardMask(Ip address, Ip wildcardMask) booleanisPrefix()static IpWildcardbooleansubsetOf(IpWildcard other) booleansupersetOf(IpWildcard other) toPrefix()toString()
-
Field Details
-
ANY
-
-
Method Details
-
ipWithWildcardMask
Return anIpWildcardfrom the givenIP addressandwildcardMask.Bits that are set in the
wildcardMaskare "don't care" bits. -
ipWithWildcardMask
Return anIpWildcardfrom the givenIP addressandwildcardMask.Bits that are set in the
wildcardMaskare "don't care" bits. -
create
-
create
-
parse
-
containsIp
-
compareTo
- Specified by:
compareToin interfaceComparable<IpWildcard>
-
equals
-
hashCode
public int hashCode() -
getIp
-
getWildcardMaskAsIp
-
getWildcardMask
public long getWildcardMask() -
getMask
public long getMask() -
intersects
- Parameters:
other- another IpWildcard- Returns:
- whether the set of IPs matched by this intersects the set of those matched by other.
-
isPrefix
public boolean isPrefix() -
subsetOf
- Parameters:
other- another IpWildcard- Returns:
- whether the set of IPs matched by this is a subset of those matched by other.
-
supersetOf
- Parameters:
other- another IpWildcard- Returns:
- whether the set of IPs matched by this is a superset of those matched by other.
-
toPrefix
-
toString
-