gnu.gnustep.base
Class NSRange
java.lang.Object
|
+--gnu.gnustep.base.NSRange
- All Implemented Interfaces:
- java.lang.Cloneable
- public final class NSRange
- extends java.lang.Object
- implements java.lang.Cloneable
This class wraps the Objective-C struct NSRange. Instances of this
class in Java contain two public fields: location, length. You are
required to set and read these variables directly.
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
ZeroRange
public static NSRange ZeroRange
location
public int location
length
public int length
NSRange
public NSRange()
NSRange
public NSRange(int aLocation,
int aLength)
NSRange
public NSRange(java.lang.String string)
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object otherObject)
- Overrides:
equals in class java.lang.Object
isEqualToRange
public boolean isEqualToRange(NSRange aRange)
locationInRange
public boolean locationInRange(int aLocation)
- Returns true if aLocation is contained in this range
maxRange
public int maxRange()
intersectsRange
public boolean intersectsRange(NSRange aRange)
isSubrangeOfRange
public boolean isSubrangeOfRange(NSRange aRange)
rangeByIntersectingRange
public NSRange rangeByIntersectingRange(NSRange aRange)
rangeByUnioningRange
public NSRange rangeByUnioningRange(NSRange aRange)
intersectRange
public void intersectRange(NSRange aRange)
unionRange
public void unionRange(NSRange aRange)
isEmpty
public boolean isEmpty()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object