From 40a9d99496e098562f090fb7ffce9e749011b131 Mon Sep 17 00:00:00 2001 From: Benjamin Culkin Date: Mon, 20 May 2024 17:58:16 -0400 Subject: Formatting pass --- .../net/wotonomy/foundation/NSMutableRange.java | 148 ++++++++++----------- 1 file changed, 67 insertions(+), 81 deletions(-) (limited to 'projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSMutableRange.java') diff --git a/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSMutableRange.java b/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSMutableRange.java index a0bcda1..2bfb692 100644 --- a/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSMutableRange.java +++ b/projects/net.wotonomy.foundation/src/main/java/net/wotonomy/foundation/NSMutableRange.java @@ -19,98 +19,84 @@ License along with this library; if not, see http://www.gnu.org package net.wotonomy.foundation; /** -* A pure java implementation of NSMutableRange. -* An NSMutableRange is a modifiable NSRange. -* -* @author michael@mpowers.net -* @author $Author: cgruber $ -* @version $Revision: 893 $ -*/ -public class NSMutableRange extends NSRange -{ - /** - * Default constructor produces an empty range. - */ - public NSMutableRange () - { - super(); - } + * A pure java implementation of NSMutableRange. An NSMutableRange is a + * modifiable NSRange. + * + * @author michael@mpowers.net + * @author $Author: cgruber $ + * @version $Revision: 893 $ + */ +public class NSMutableRange extends NSRange { + /** + * Default constructor produces an empty range. + */ + public NSMutableRange() { + super(); + } - /** - * Produces a range that has the same location and length as - * the specified range. - */ - public NSMutableRange (NSRange aRange) - { - super( aRange ); - } + /** + * Produces a range that has the same location and length as the specified + * range. + */ + public NSMutableRange(NSRange aRange) { + super(aRange); + } - /** - * Produces a range with the specified location and length. - */ - public NSMutableRange (int location, int length) - { - super( location, length ); - } + /** + * Produces a range with the specified location and length. + */ + public NSMutableRange(int location, int length) { + super(location, length); + } - /** - * Sets the location of this range. - */ - public void setLocation (int location) - { - loc = location; - } + /** + * Sets the location of this range. + */ + public void setLocation(int location) { + loc = location; + } - /** - * Sets the length of this range. - */ - public void setLength (int length) - { - len = length; - } - - /** - * Modifies this range to be the union of this - * range and the specified range. - */ - public void unionRange (NSRange aRange) - { - NSRange range = rangeByUnioningRange( aRange ); - setLocation( range.location() ); - setLength( range.length() ); - } + /** + * Sets the length of this range. + */ + public void setLength(int length) { + len = length; + } - /** - * Modifies this range to be the intersection of this - * range and the specified range. - */ - public void intersectRange (NSRange aRange) - { - NSRange range = rangeByIntersectingRange( aRange ); - setLocation( range.location() ); - setLength( range.length() ); - } + /** + * Modifies this range to be the union of this range and the specified range. + */ + public void unionRange(NSRange aRange) { + NSRange range = rangeByUnioningRange(aRange); + setLocation(range.location()); + setLength(range.length()); + } - /** - * Returns a copy of this range. - */ - public Object clone () - { - return new NSMutableRange( location(), length() ); - } + /** + * Modifies this range to be the intersection of this range and the specified + * range. + */ + public void intersectRange(NSRange aRange) { + NSRange range = rangeByIntersectingRange(aRange); + setLocation(range.location()); + setLength(range.length()); + } + + /** + * Returns a copy of this range. + */ + public Object clone() { + return new NSMutableRange(location(), length()); + } } /* - * $Log$ - * Revision 1.2 2006/02/16 13:15:00 cgruber - * Check in all sources in eclipse-friendly maven-enabled packages. + * $Log$ Revision 1.2 2006/02/16 13:15:00 cgruber Check in all sources in + * eclipse-friendly maven-enabled packages. * - * Revision 1.1.1.1 2000/12/21 15:47:36 mpowers - * Contributing wotonomy. + * Revision 1.1.1.1 2000/12/21 15:47:36 mpowers Contributing wotonomy. * - * Revision 1.3 2000/12/20 16:25:38 michael - * Added log to all files. + * Revision 1.3 2000/12/20 16:25:38 michael Added log to all files. * * */ - -- cgit v1.2.3