PATH  Documentation > Mac OS X > Foundation Reference: Java



Table of Contents

NSMutableCharacterSet


Inherits from:
NSCharacterSet : NSObject
Package:
com.apple.yellow.foundation


Class Description


The NSMutableCharacterSet class declares the programmatic interface to objects that manage a modifiable set of Unicode characters. You can add or remove characters from a mutable character set as numeric values in NSRanges or as character values in strings; combine character sets by union or intersection; and invert a character set.

Mutable character sets are less efficient to use than immutable character sets. If you don't need to change a character set after creating it, create an immutable copy with copy and use that.

NSMutableCharacterSet defines no primitive methods. Subclasses must implement all methods declared by this class in addition to the primitives of NSCharacterSet.




Method Types


Constructors
NSMutableCharacterSet
Adding and removing characters
addCharacter
removeCharacter
addCharactersInRange
removeCharactersInRange
addCharactersInString
removeCharactersInString
Combining character sets
intersectCharacterSet
subtractCharacterSet
unionCharacterSet
Inverting a character set
invertCharacterSet


Constructors



NSMutableCharacterSet

public NSMutableCharacterSet()

Description forthcoming.

public NSMutableCharacterSet(NSData aData)

Description forthcoming.

public NSMutableCharacterSet(NSRange aRange)

Description forthcoming.

public NSMutableCharacterSet(String aString)

Description forthcoming.


Instance Methods



addCharacter

public void addCharacter(char aChar)

Description forthcoming.

addCharactersInRange

public void addCharactersInRange(NSRange aRange)

Adds the characters whose integer values are given by aRange to the receiver. aRange.location is the value of the first character to add, aRange.location + aRange.length - 1 is the value of the last. If aRange.length is 0 this method has no effect.

See Also: removeCharactersInRange, addCharactersInString



addCharactersInString

public void addCharactersInString(String aString)

Adds the characters in aString to those in the receiver. This method has no effect if aString is empty.

See Also: removeCharactersInString, addCharactersInRange



intersectCharacterSet

public void intersectCharacterSet(NSCharacterSet otherSet)

Modifies the receiver so it contains only characters that exist in both the receiver and in otherSet.

See Also: unionCharacterSet



unionCharacterSet

public void unionCharacterSet(NSCharacterSet otherSet)

Modifies the receiver so it contains all characters that exist in either the receiver or otherSet.

See Also: intersectCharacterSet



invertCharacterSet

public void invertCharacterSet()

Replaces all the characters in the receiver with all the characters it didn't previously contain.

removeCharacter

public void removeCharacter(char aChar)

Description forthcoming.

removeCharactersInRange

public void removeCharactersInRange(NSRange aRange)

Removes from the receiver the characters whose integer values are given by aRange. aRange.location is the value of the first character to remove, and aRange.location + aRange.length - 1 is the value of the last. If aRange.length is 0 this method has no effect.

See Also: addCharactersInRange, removeCharactersInString



removeCharactersInString

public void removeCharactersInString(String aString)

Removes the characters in aString from those in the receiver. This method has no effect if aString is empty.

See Also: addCharactersInString, removeCharactersInRange



subtractCharacterSet

public void subtractCharacterSet(NSCharacterSet aCharacterSet)

Description forthcoming.


Table of Contents