xbn.array
Class ArrayProtector

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.array.ArrayProtector
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
APChar, APInt, APObject, APString

public abstract class ArrayProtector
extends XBNObject
implements Cloneable

The base class for protecting an array, by only allowing access to its elements.

Source code:  ArrayProtector.java


Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
ArrayProtector()
          Create an ArrayProtector.
 
Method Summary
abstract  int getLength()
          How many elements exist in the array-being-protected?
 String getList()
          Get a listing of every item in this ArrayProtector.
 String getList(String s_divider)
          Get a listing of every item in this ArrayProtector.
 String getList(String s_prefix, String s_postfix)
          Get a listing of every item in this ArrayProtector.
 String getList(String s_prefix, String s_divider, String s_postfix)
          Get a listing of every item in this ArrayProtector.
 PASArrayProtector getPASArrayProtector()
           
abstract  String getString(int i_dx)
           
abstract  boolean isNull()
          As a whole, is the array-being-protected null?
abstract  boolean isNull(int i_dx)
           
abstract  String toString()
          Get some information about this ArrayProtector.
 
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, wait, wait, wait
 

Constructor Detail

ArrayProtector

public ArrayProtector()

Create an ArrayProtector. This constructor does nothing.

Method Detail

isNull

public abstract boolean isNull()

As a whole, is the array-being-protected null?


getLength

public abstract int getLength()

How many elements exist in the array-being-protected?

Returns:
[the internal array].length
Throws:
AssertException - If isNull equals true.

toString

public abstract String toString()

Get some information about this ArrayProtector.

Overrides:
toString in class Object

getString

public abstract String getString(int i_dx)

isNull

public abstract boolean isNull(int i_dx)

getPASArrayProtector

public final PASArrayProtector getPASArrayProtector()

getList

public String getList()

Get a listing of every item in this ArrayProtector.

Returns:
(new ListPA()).get(getPASArrayProtector())

getList

public String getList(String s_divider)

Get a listing of every item in this ArrayProtector.

Returns:
(new ListPA(s_divider)).get(getPASArrayProtector())

getList

public String getList(String s_prefix,
                      String s_postfix)

Get a listing of every item in this ArrayProtector.

Returns:
(new ListPA(s_prefix, s_postfix)).get(getPASArrayProtector())

getList

public String getList(String s_prefix,
                      String s_divider,
                      String s_postfix)

Get a listing of every item in this ArrayProtector.

Returns:
(new ListPA(s_prefix, s_divider, s_postfix)).get(getPASArrayProtector())



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