Class IdRanges
java.lang.Object
com.pnfsoftware.jeb.core.units.code.IdRanges
A collection of var-id ranges.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int varid, int bitsize) void
void
void
addAll
(Collection<? extends IVariable> vars) void
addAll
(Collection<? extends IVariable> vars, IdRanges exclusions) void
addAll
(Collection<? extends IVariable> vars, Collection<? extends IVariable> exclusions) int
bsize()
void
clear()
void
collectBits
(List<Integer> r) void
boolean
containsVarFull
(int varid) boolean
containsVarFull
(int varid, int bitsize) boolean
containsVarPart
(IVariable var) boolean
getBits()
Generate a list (modifiable copy) containing the variable ids stored in this object.int
hashCode()
boolean
hasIntersection
(IdRanges other) Check if there is common range between current range and the other range.intersection
(IdRanges other) Return common range between current range and the other range.boolean
isEmpty()
void
remove
(int varId) void
int
size()
Provide the number of accessed variables.toString()
-
Constructor Details
-
IdRanges
public IdRanges() -
IdRanges
-
-
Method Details
-
clear
public void clear() -
bsize
public int bsize() -
size
public int size()Provide the number of accessed variables. -
isEmpty
public boolean isEmpty() -
remove
-
remove
public void remove(int varId) -
addAll
public void addAll(Collection<? extends IVariable> vars, Collection<? extends IVariable> exclusions) -
addAll
-
addAll
-
add
-
add
-
add
public void add(int varid, int bitsize) -
containsVarPart
-
containsVarFull
public boolean containsVarFull(int varid, int bitsize) -
containsVarFull
public boolean containsVarFull(int varid) -
getVarIds
Generate a list (modifiable copy) containing the variable ids stored in this object. Not all variables may be accessed fully.- Returns:
-
collectVarIds
-
getBits
-
collectBits
-
intersection
Return common range between current range and the other range.- Parameters:
other
- other range- Returns:
- intersection
-
hasIntersection
Check if there is common range between current range and the other range.- Parameters:
other
- other range- Returns:
- true if there is a non empty intersection
-
hashCode
public int hashCode() -
equals
-
toString
-