xbn.array.primitive
Class PAViolation

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.array.primitive.PAViolation

public class PAViolation
extends XBNObject

Holds information regarding violations that are detected by PrimitiveArray.isValid. See PrimitiveArray.isValid.

Source code:  PAViolation.java


Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
PAViolation()
          Create a PAViolation.
PAViolation(int i_type)
          .
PAViolation(int i_type, int i_idxFirst)
          .
PAViolation(int i_type, int i_idxFirst, int i_idxSecond)
          .
PAViolation(int i_type, int i_idxFirst, int i_idxSecond, int i_containedAtIdx)
          .
 
Method Summary
protected  void declareNoViolation()
          Declare that this PrimitiveArray and its contents are truly valid.
 int getContainedAtIdx()
           
 int getIdxFirst()
           
 int getIdxSecond()
           
static int getType_ILMNT_OOBOUNDS()
           
static int getType_LENGTH()
           
static int getType_LMNT_DUPLICATE()
           
static int getType_LMNT_ILLEGAL()
           
static int getType_LMNT_OOORDER()
           
static int getType_NULL()
           
static int getType_SLMNT_CONTAINED()
           
static int getType_SLMNT_LENGTH()
           
static int getType_SLMNT_NULL()
           
static int getType_VALID()
           
 int getType()
           
 boolean hasNoViolation()
           
 
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
 

Constructor Detail

PAViolation

public PAViolation()

Create a PAViolation.

VALID


PAViolation

public PAViolation(int i_type)

.

NULL or LENGTH


PAViolation

public PAViolation(int i_type,
                   int i_idxFirst)

.

LMNT_OOBOUNDS, SLMNT_NULL, SLMNT_LENGTH or LMNT_ILLEGAL


PAViolation

public PAViolation(int i_type,
                   int i_idxFirst,
                   int i_idxSecond)

.

DUPLICATE or LMNT_OOORDER


PAViolation

public PAViolation(int i_type,
                   int i_idxFirst,
                   int i_idxSecond,
                   int i_containedAtIdx)

.

If bFALSE_IN_PRODUCTION equals true, then as much as possible is checked, to ensure these parameters are valid. If false, then the parameters are assumed to be correct.

DUPLICATE (i_containedAtIdx must equal -1), LMNT_OOORDER (i_containedAtIdx must equal -1) or SLMNT_CONTAINED.

Method Detail

declareNoViolation

protected final void declareNoViolation()

Declare that this PrimitiveArray and its contents are truly valid.

Right before your version of isValid returns true, be sure to also call this function. See isValid.

Be careful when calling this function directly. You can call this function manually, but if the [thing being wrapped to look like an array] is not valid, you will get unpredictable results when using PrimitiveArray (or any of its children). Moral: Don't call this function unless you know what you're doing.


hasNoViolation

public final boolean hasNoViolation()

getType

public final int getType()

getIdxFirst

public final int getIdxFirst()

getIdxSecond

public final int getIdxSecond()

getContainedAtIdx

public int getContainedAtIdx()

getType_VALID

public static final int getType_VALID()

getType_NULL

public static final int getType_NULL()

getType_LENGTH

public static final int getType_LENGTH()

getType_LMNT_DUPLICATE

public static final int getType_LMNT_DUPLICATE()

getType_LMNT_OOORDER

public static final int getType_LMNT_OOORDER()

getType_LMNT_ILLEGAL

public static final int getType_LMNT_ILLEGAL()

getType_SLMNT_CONTAINED

public static final int getType_SLMNT_CONTAINED()

getType_SLMNT_NULL

public static final int getType_SLMNT_NULL()

getType_SLMNT_LENGTH

public static final int getType_SLMNT_LENGTH()

getType_ILMNT_OOBOUNDS

public static final int getType_ILMNT_OOBOUNDS()



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