|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.tmatesoft.svn.core.SVNMergeRangeList
public class SVNMergeRangeList
The SVNMergeRangeList represents an array of merge ranges applied to a single target. Provides addition functionality to operate with merge range lists.
Field Summary | |
---|---|
static java.lang.String |
MERGE_INFO_NONINHERITABLE_STRING
A string that is used in mergeinfo to mark the mergeinfo as being non-inheritable. |
Constructor Summary | |
---|---|
SVNMergeRangeList(long start,
long end,
boolean inheritable)
Creates a new merge range list initializing it with a single merge range which parameters are passed to this constructor. |
|
SVNMergeRangeList(SVNMergeRange range)
Creates a new merge range list initializing it with the specified single merge range. |
|
SVNMergeRangeList(SVNMergeRange[] ranges)
Creates a new merge range list initializing it with an array of merge ranges. |
Method Summary | |
---|---|
SVNMergeRangeList |
diff(SVNMergeRangeList eraserRangeList,
boolean considerInheritance)
Removes eraserRangeList (the subtrahend) from this range list (the
minuend), and places the resulting difference into a new SVNMergeRangeList object. |
SVNMergeRangeList |
dup()
Makes a copy of this merge range list. |
static SVNMergeRangeList |
fromCollection(java.util.Collection mergeRanges)
Creates a new SVNMergeRangeList from a collection of
merge ranges . |
SVNMergeRangeList |
getInheritableRangeList(long startRev,
long endRev)
Returns a sublist of this range list which excludes all non-inheritable merge ranges. |
SVNMergeRangeList |
getInheritableRangeList(long startRev,
long endRev,
boolean inheritable)
|
SVNMergeRange[] |
getRanges()
Returns an array of SVNMergeRange ranges backed by this merge range list object. |
java.util.List<SVNMergeRange> |
getRangesAsList()
Returns a list of merge ranges backed by this merge range list. |
int |
getSize()
Returns number of merge ranges stored in this merge range list. |
boolean |
includes(long revision)
Runs through all merge ranges in this object and says, whether the specified revision
falls between start and end revision of any of those ranges. |
SVNMergeRangeList |
intersect(SVNMergeRangeList rangeList,
boolean considerInheritance)
Finds the intersection of this range list and rangeList and places the result into
a new SVNMergeRangeList object. |
boolean |
isEmpty()
Checks whether this merge range list has no merge ranges. |
SVNMergeRangeList |
merge(SVNMergeRangeList rangeList)
Merges two range lists placing the results into a new SVNMergeRangeList object. |
SVNMergeRangeList |
mergeRevision(long revision)
|
void |
pushRange(long start,
long end,
boolean inheritable)
Appends a new merge range to the end of the ranges list. |
SVNMergeRangeList |
remove(SVNMergeRangeList remove,
boolean considerInheritance)
|
SVNMergeRangeList |
reverse()
Reverses this range list, and the start and end fields of each range in this range list, in place. |
void |
setInheritable(boolean inheritable)
|
void |
setRanges(SVNMergeRange[] ranges)
Replaces the array of SVNMergeRange objects backed by this object
with a new one. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String MERGE_INFO_NONINHERITABLE_STRING
Constructor Detail |
---|
public SVNMergeRangeList(long start, long end, boolean inheritable)
start
- merge range start revisionend
- merge range end revisioninheritable
- inheritance informationpublic SVNMergeRangeList(SVNMergeRange range)
range
- merge rangepublic SVNMergeRangeList(SVNMergeRange[] ranges)
ranges
are not copied to a separate array but stored immediately, as is.
ranges
- merge ranges arrayMethod Detail |
---|
public void setRanges(SVNMergeRange[] ranges)
SVNMergeRange
objects backed by this object
with a new one.
This method was introduced because of purposes of convenience. Use this method
with care as it changes the internal state of this SVNMergeRangeList
object.
ranges
- new merge ranges arraypublic void setInheritable(boolean inheritable)
public SVNMergeRange[] getRanges()
SVNMergeRange
ranges backed by this merge range list object.
Note: this method does not make a copy of the original array, instead it returns the original array
itself. If you want a safe copy of merge ranges, use getRangesAsList()
instead.
Note: merge ranges returned in the array are not copied.
public java.util.List<SVNMergeRange> getRangesAsList()
public void pushRange(long start, long end, boolean inheritable)
SVNMergeRange
is created used the parameters passed to this method.
start
- merge range start revisionend
- merge range end revisioninheritable
- inheritance informationpublic int getSize()
public boolean isEmpty()
public SVNMergeRangeList dup()
SVNMergeRangeList
instance.
public SVNMergeRangeList merge(SVNMergeRangeList rangeList) throws SVNException
SVNMergeRangeList
object.
Either range list may be empty.
When intersecting range lists are merged, the inheritability of the resulting SVNMergeRange
depends on the inheritability of the operands. If two non-inheritable ranges are merged the result is
always non-inheritable, in all other cases the resulting range is inheritable.
Note: range lists must be sorted in ascending order. The return range list is guaranteed to remain
in sorted order and be compacted to the minimal number of ranges needed to represent the merged result.
Note: this method does not change the state of this object. Instead it produces a result in a new object.
rangeList
- range list to merge with
SVNException
public java.lang.String toString()
toString
in class java.lang.Object
public SVNMergeRangeList diff(SVNMergeRangeList eraserRangeList, boolean considerInheritance)
eraserRangeList
(the subtrahend) from this range list (the
minuend), and places the resulting difference into a new SVNMergeRangeList
object.
eraserRangeList
- ranges to remove from this range listconsiderInheritance
- whether inheritance information should be taken into account
public SVNMergeRangeList intersect(SVNMergeRangeList rangeList, boolean considerInheritance)
rangeList
and places the result into
a new SVNMergeRangeList
object.
rangeList
- range list to intersect withconsiderInheritance
- whether inheritance information should be taken into account
public boolean includes(long revision)
revision
falls between start and end revision of any of those ranges.
revision
- revision to find in ranges
revision
public SVNMergeRangeList reverse()
public SVNMergeRangeList getInheritableRangeList(long startRev, long endRev)
startRev
and endRev
are
valid
revisions and startRev
is less than or equal to endRev
, then excludes only
the non-inheritable revision ranges that intersect inclusively with the range
defined by startRev
and endRev
. If this range list contains no elements,
returns an empty array.
startRev
- start revisionendRev
- end revision
SVNMergeRangeList
object with only inheritable ranges from
this range listpublic SVNMergeRangeList getInheritableRangeList(long startRev, long endRev, boolean inheritable)
public static SVNMergeRangeList fromCollection(java.util.Collection mergeRanges)
SVNMergeRangeList
from a collection of
merge ranges
.
mergeRanges
- merge ranges collection
mergeRanges
public SVNMergeRangeList remove(SVNMergeRangeList remove, boolean considerInheritance)
public SVNMergeRangeList mergeRevision(long revision)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |