public class ScopeDefinition
extends java.lang.Object
implements java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXCLUDE_PREFIX |
static java.lang.String |
RANGE_SEPARATOR |
Constructor and Description |
---|
ScopeDefinition() |
ScopeDefinition(Range[] includedRanges,
Range[] excludedRanges) |
ScopeDefinition(ScopeDefinition[] rangedScopes) |
ScopeDefinition(java.lang.String scopeDefStr) |
ScopeDefinition(java.lang.String[] rangesStrs) |
Modifier and Type | Method and Description |
---|---|
void |
addIncludedRange(java.lang.String[] rangesStr) |
int |
compareTo(java.lang.Object o) |
Range[] |
createRangeArray(int size) |
boolean |
equals(java.lang.Object o) |
void |
fillStringVector(StringVector sv) |
Range[] |
getExcludedRanges() |
IPv4 |
getFirstOverlapIP(Range range)
Returns the strat (first IP) of the overlap with the given range
|
Range[] |
getIncludedRanges() |
Range |
getIncludeRange(IPv4 ip) |
java.util.List<Range> |
getNonOverlapRanges(ScopeDefinition otherScope)
Get the differences in ranges
|
java.util.List<Range> |
getOverlapRanges(ScopeDefinition otherScope)
Get a list of IP ranges, that the current Scope and the otherScope overlap.
|
int |
hashCode() |
boolean |
isEntirelyInScope(Range range) |
boolean |
isEntirelyInScope(ScopeDefinition scope) |
boolean |
isInIncludedScope(ScopeDefinition range) |
boolean |
isInScope(IPv4 ip) |
boolean |
isInScope(Range range)
Checks if the specified range is inside this network scope definition
|
boolean |
isInScope(ScopeDefinition scope)
check if the given range is in scope
|
boolean |
isRangeOverlapWithExcludedRange(ScopeDefinition range) |
void |
setExcludedRanges(Range[] array) |
Range[] |
splitToIncludeRanges() |
ScopeDefinition |
subtractScope(ScopeDefinition scope) |
java.lang.String |
toDisplayString(java.lang.String sepStr) |
ScopeDefinition[] |
toRangedScopes()
todo...
|
java.lang.String |
toString() |
StringVector |
toStringVector() |
public static final java.lang.String EXCLUDE_PREFIX
public static final java.lang.String RANGE_SEPARATOR
public ScopeDefinition(ScopeDefinition[] rangedScopes)
public ScopeDefinition()
public ScopeDefinition(java.lang.String scopeDefStr)
public ScopeDefinition(java.lang.String[] rangesStrs)
public void setExcludedRanges(Range[] array)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isInScope(Range range)
range
- range to checkpublic boolean isEntirelyInScope(Range range)
public IPv4 getFirstOverlapIP(Range range)
range
- range to checkpublic boolean isInScope(IPv4 ip)
public void fillStringVector(StringVector sv)
public StringVector toStringVector()
public java.lang.String toDisplayString(java.lang.String sepStr)
public java.lang.String toString()
toString
in class java.lang.Object
public Range[] getIncludedRanges()
public Range[] getExcludedRanges()
public ScopeDefinition[] toRangedScopes()
public java.util.List<Range> getOverlapRanges(ScopeDefinition otherScope)
otherScope
- public java.util.List<Range> getNonOverlapRanges(ScopeDefinition otherScope)
otherScope
- public ScopeDefinition subtractScope(ScopeDefinition scope)
public Range[] splitToIncludeRanges()
public Range[] createRangeArray(int size)
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public void addIncludedRange(java.lang.String[] rangesStr)
public boolean isInScope(ScopeDefinition scope)
scope
- public boolean isEntirelyInScope(ScopeDefinition scope)
public boolean isInIncludedScope(ScopeDefinition range)
public boolean isRangeOverlapWithExcludedRange(ScopeDefinition range)
Documentation Feedback
Copyright 2012 Micro Focus or one of its affiliates.