net.wotonomy.foundation
Class NSMutableRange

java.lang.Object
  extended by net.wotonomy.foundation.NSRange
      extended by net.wotonomy.foundation.NSMutableRange
All Implemented Interfaces:
java.lang.Cloneable

public class NSMutableRange
extends NSRange

A pure java implementation of NSMutableRange. An NSMutableRange is a modifiable NSRange.

Version:
$Revision: 893 $
Author:
michael@mpowers.net, $Author: cgruber $

Field Summary
 
Fields inherited from class net.wotonomy.foundation.NSRange
len, loc, ZeroRange
 
Constructor Summary
NSMutableRange()
          Default constructor produces an empty range.
NSMutableRange(int location, int length)
          Produces a range with the specified location and length.
NSMutableRange(NSRange aRange)
          Produces a range that has the same location and length as the specified range.
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this range.
 void intersectRange(NSRange aRange)
          Modifies this range to be the intersection of this range and the specified range.
 void setLength(int length)
          Sets the length of this range.
 void setLocation(int location)
          Sets the location of this range.
 void unionRange(NSRange aRange)
          Modifies this range to be the union of this range and the specified range.
 
Methods inherited from class net.wotonomy.foundation.NSRange
equals, fromString, hashCode, intersectsRange, isEmpty, isEqualToRange, isSubrangeOfRange, length, location, locationInRange, maxRange, rangeByIntersectingRange, rangeByUnioningRange, subtractRange, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NSMutableRange

public NSMutableRange()
Default constructor produces an empty range.


NSMutableRange

public NSMutableRange(NSRange aRange)
Produces a range that has the same location and length as the specified range.


NSMutableRange

public NSMutableRange(int location,
                      int length)
Produces a range with the specified location and length.

Method Detail

setLocation

public void setLocation(int location)
Sets the location of this range.


setLength

public void setLength(int length)
Sets the length of this range.


unionRange

public void unionRange(NSRange aRange)
Modifies this range to be the union of this range and the specified range.


intersectRange

public void intersectRange(NSRange aRange)
Modifies this range to be the intersection of this range and the specified range.


clone

public java.lang.Object clone()
Returns a copy of this range.

Overrides:
clone in class NSRange


Copyright © 2006 null. All Rights Reserved.