com.vgrs.xcode.common
Class UnicodeMatrix

java.lang.Object
  extended by com.vgrs.xcode.common.UnicodeMatrix

public class UnicodeMatrix
extends java.lang.Object

Implements a single Unicode Plane as a matrix of boolean flags 8K in size.

Author:
jcolosi

Constructor Summary
UnicodeMatrix(int aPlane)
          Construct a UnicodeMatrix to store 65,535 flags
 
Method Summary
 void insert(int aCodePoint)
          Store an integer in the UnicodeMatrix
 void insert(int[] aRange)
          Store a range in the UnicodeMatrix
 void insert(int aFirst, int aLast)
          Store a range in the UnicodeMatrix
 void insert(Range aRange)
          Store a range in the UnicodeMatrix
 boolean spans(int[] aRange)
          Return true if the given range fits completely inside the matrix.
 boolean spans(int aFirst, int aLast)
          Return true if the given range fits completely inside the matrix.
 boolean spans(Range aRange)
          Return true if the given range fits completely inside the matrix.
 boolean test(int aInput)
          Test for intersection between a single integer and the UnicodeMatrix
 java.lang.String toString()
          Display the matrix data to standard output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnicodeMatrix

public UnicodeMatrix(int aPlane)
Construct a UnicodeMatrix to store 65,535 flags

Parameters:
aPlane - A number on the range [0-16] indicating the active plane.
Method Detail

insert

public void insert(int[] aRange)
Store a range in the UnicodeMatrix

Parameters:
aRange - An integer array of length two. The first element is the lower bound and the second element is the upper bound.

insert

public void insert(Range aRange)
Store a range in the UnicodeMatrix

Parameters:
aRange - A Range object.

insert

public void insert(int aFirst,
                   int aLast)
Store a range in the UnicodeMatrix

Parameters:
aFirst - The lower bound (inclusive)
aLast - The upper bound (inclusive)

insert

public void insert(int aCodePoint)
Store an integer in the UnicodeMatrix

Parameters:
aCodePoint - An integer to be inserted in matrix

spans

public boolean spans(int[] aRange)
Return true if the given range fits completely inside the matrix.

Parameters:
aRange - An integer array of length two. The first element is the lower bound and the second element is the upper bound.

spans

public boolean spans(Range aRange)
Return true if the given range fits completely inside the matrix.

Parameters:
aRange - A Range object.

spans

public boolean spans(int aFirst,
                     int aLast)
Return true if the given range fits completely inside the matrix.

Parameters:
aFirst - The lower bound (inclusive)
aLast - The upper bound (inclusive)

test

public boolean test(int aInput)
Test for intersection between a single integer and the UnicodeMatrix

Parameters:
aInput - An integer

toString

public java.lang.String toString()
Display the matrix data to standard output.

Overrides:
toString in class java.lang.Object


Copyright © 2000-2010 VeriSign Inc. All Rights Reserved