xbn.array.primitive
Class PACChar

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.util.XBNLocked
              |
              +--xbn.array.primitive.PrimitiveArray
                    |
                    +--xbn.array.primitive.PrimitiveArrayChar
                          |
                          +--xbn.array.primitive.PACChar
All Implemented Interfaces:
LockOneWay

public class PACChar
extends PrimitiveArrayChar
implements LockOneWay

A PrimitiveArrayChar that wraps around an array of chars.

Source code:  PACChar.java.


Field Summary
static String sPACC
          To shorten code and Javadoc.
 
Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
PACChar()
          Create a PACChar with default values.
PACChar(char[] a_char)
          Create a PACChar.
PACChar(char[] a_char, boolean b_lock)
          Create a PACChar.
PACChar(char[] a_char, PARChar par_char)
          Create a PACChar.
PACChar(String s_fqExtendingClass, char[] a_char)
          Create a PACChar.
PACChar(String s_fqExtendingClass, char[] a_char, boolean b_lock)
          Create a PACChar.
PACChar(String s_fqExtendingClass, char[] a_char, PARChar par_char)
          Create a PACChar.
PACChar(String s_fqExtendingClass, char[] a_char, PARChar par_char, boolean b_lock)
          Create an PACChar.
 
Method Summary
 char[] getAOChar()
          Get the array of chars for direct manipulation.
 char getChar(int i_dx)
          Get the char at the provide array index.
 int getLength()
          How many chars are in the char array?
 boolean isLocked()
          Is the value locked?
 boolean isNull()
          Is the array null?
 boolean isNull(int i_dx)
          Is the char at the requested array index null?
 void lock()
          Lock the value, forbidding further sets.
 
Methods inherited from class xbn.array.primitive.PrimitiveArrayChar
areLmntsEqual, areLmntsEqual, getPARChar, getString, isValid
 
Methods inherited from class xbn.array.primitive.PrimitiveArray
areLmntsEqual, crashIfBad, crashIfBad, declareNoViolation, getFQClassName, getList, getList, getList, getList, getNewAOSOBString, getNewAOSOBStringBuffer, getNewAOString, getPAViolation, getPrimitiveArrayRule, getSOBString, getSOBStringBuffer, isValid, setPAViolation, throwAXIllegal, throwLmntsEqualAioobx, wasValidated
 
Methods inherited from class xbn.util.XBNLocked
throwLX, throwLX, throwLXIfLocked, throwLXIfLocked, throwLXIfLocked, throwLXIfUnlocked
 
Methods inherited from class xbn.XBNObject
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sPACC

public static final String sPACC

To shorten code and Javadoc.

Equal to "xbn.array.primitive.PACChar"

Constructor Detail

PACChar

public PACChar()

Create a PACChar with default values.

Equal to PACChar(null)


PACChar

public PACChar(char[] a_char)

Create a PACChar.

Equal to PACChar(sPACC, a_char)


PACChar

public PACChar(String s_fqExtendingClass,
               char[] a_char)

Create a PACChar.

Equal to PACChar(s_fqExtendingClass, a_char, (new PARChar()))


PACChar

public PACChar(char[] a_char,
               PARChar par_char)

Create a PACChar.

Equal to PACChar(sPACC, a_char)


PACChar

public PACChar(String s_fqExtendingClass,
               char[] a_char,
               PARChar par_char)

Create a PACChar.

Equal to PACChar(s_fqExtendingClass, a_char, par_char)


PACChar

public PACChar(char[] a_char,
               boolean b_lock)

Create a PACChar.

Equal to PACChar(sPACC, a_char, (new PARChar()), b_lock)


PACChar

public PACChar(String s_fqExtendingClass,
               char[] a_char,
               boolean b_lock)

Create a PACChar.

Equal to PACChar(s_fqExtendingClass, a_char, (new PARChar()), b_lock)


PACChar

public PACChar(String s_fqExtendingClass,
               char[] a_char,
               PARChar par_char,
               boolean b_lock)

Create an PACChar.

Equal to PrimitiveArrayChar(s_fqExtendingClass, a_char, par_char, b_lock)

Parameters:
a_char - The array of ints to analyze.
b_lock - Should the char array be directly accessible, via getAOChar? If true, yes. If false, no.
Method Detail

getAOChar

public char[] getAOChar()

Get the array of chars for direct manipulation.

Returns:
a_char Exactly as provided to the constructor.

getChar

public char getChar(int i_dx)

Get the char at the provide array index.

Overrides:
getChar in class PrimitiveArrayChar
Parameters:
i_dx - The array index. Must range 0..[getLength() - 1], inclusive
Returns:
a_char[i_dx] Where a_char is exactly as pacced into the constructor.
Throws:
AssertException - If isNull equals true.

getLength

public int getLength()

How many chars are in the char array?

Overrides:
getLength in class PrimitiveArray
Returns:
a_char.length Where a_char is exactly as pacced into the constructor.
Throws:
AssertException - If isNull equals true.

isNull

public boolean isNull()

Is the array null?

Overrides:
isNull in class PrimitiveArray
Returns:
(a_char == null) Where a_char is exactly as pacced into the constructor.

isNull

public boolean isNull(int i_dx)

Is the char at the requested array index null?

Overrides:
isNull in class PrimitiveArray
Returns:
false It is not possible for a char to be null.

lock

public final void lock()
Description copied from interface: LockOneWay

Lock the value, forbidding further sets. There is no way to unlock the value, so consider this function a "one way ticket".

It is recommended to crash if the value is already locked (isLocked is true). You must crash in your class' "set" functions when isLocked is true.

Specified by:
lock in interface LockOneWay
Following copied from interface: xbn.util.LockOneWay
Throws:
AssertException - If isLocked is true.

isLocked

public final boolean isLocked()
Description copied from interface: LockOneWay

Is the value locked?

Specified by:
isLocked in interface LockOneWay
Following copied from interface: xbn.util.LockOneWay
Returns:
true If lock has been called at some moment before now. This indicates that the value is locked and may no longer be altered.
false If lock has not yet been called. This indicates that the value may still be altered.



Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.

 

http://sourceforge.net/projects/xbnjava

 

SourceForge.net Logo