xbn.array.primitive
Class PARDupNullLen

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.array.primitive.PARDupNullLen
Direct Known Subclasses:
PARDNLGoodUnq

public class PARDupNullLen
extends XBNObject

PrimitiveArrayRule configuration regarding duplicates, null-ness and element length.

Source code:  PARDupNullLen.java


Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
PARDupNullLen()
          Create an unrestricted PARDupNullLen.
PARDupNullLen(boolean b_dupsOk)
          Create a PARDupNullLen.
PARDupNullLen(boolean b_dupsOk, boolean b_nullOk)
          Create a PARDupNullLen.
PARDupNullLen(boolean b_dupsOk, boolean b_nullOk, RCLength rc_length)
          Create a PARDupNullLen.
PARDupNullLen(boolean b_dupsOk, RCLength rc_length)
          Create a PARDupNullLen.
PARDupNullLen(PARDupNullLen par_dupNullLen)
          Create a full (deep) copy of the provided PARDupNullLen.
PARDupNullLen(RCLength rc_length)
          Create a PARDupNullLen.
 
Method Summary
 boolean areDupsOk()
          Is it okay for the array to have duplicate values?
 RCLength getRCLength()
          Get the RCLength defining the legal range of lengths for the array.
 boolean isNullOk()
          Is it okay for the array to be null (as a whole)?
 boolean isRestricted()
          Does this PARDupNullLen have any restrictions?
 boolean isStrict()
          Is this PARDupNullLen as restricted as possible?
 String toString()
          Get some information about this PARDupNullLen.
 
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

PARDupNullLen

public PARDupNullLen()

Create an unrestricted PARDupNullLen.

Equal to PARDupNullLen(true)


PARDupNullLen

public PARDupNullLen(boolean b_dupsOk)

Create a PARDupNullLen.

Equal to PARDupNullLen(b_dupsOk, true)


PARDupNullLen

public PARDupNullLen(RCLength rc_length)

Create a PARDupNullLen.

Equal to PARDupNullLen(true, rc_length)


PARDupNullLen

public PARDupNullLen(boolean b_dupsOk,
                     boolean b_nullOk)

Create a PARDupNullLen.

Equal to PARDupNullLen(b_dupsOk, b_nullOk, (new RCLength()))


PARDupNullLen

public PARDupNullLen(boolean b_dupsOk,
                     RCLength rc_length)

Create a PARDupNullLen.

Equal to PARDupNullLen(b_dupsOk, true, rc_length)


PARDupNullLen

public PARDupNullLen(boolean b_dupsOk,
                     boolean b_nullOk,
                     RCLength rc_length)

Create a PARDupNullLen.

Parameters:
b_dupsOk - If true, there may be duplicate values in the array. If false, all values must be unique. See areDupsOk.
b_nullOk - If true, PrimitiveArray.isNull may be true. If false, isNull may not be true. See isNullOk.
rc_length - The range that the array's length must conform to. See getRCLength.

PARDupNullLen

public PARDupNullLen(PARDupNullLen par_dupNullLen)

Create a full (deep) copy of the provided PARDupNullLen.

Parameters:
par_dupNullLen - The object to copy. May not be null.
Method Detail

areDupsOk

public final boolean areDupsOk()

Is it okay for the array to have duplicate values?

Returns:
b_dupsOk Exactly as provided to the constructor.

isNullOk

public final boolean isNullOk()

Is it okay for the array to be null (as a whole)?

Returns:
b_nullOk Exactly as provided to the constructor.

getRCLength

public final RCLength getRCLength()

Get the RCLength defining the legal range of lengths for the array.

Returns:
rc_length Exactly as provided to the constructor.

isRestricted

public boolean isRestricted()

Does this PARDupNullLen have any restrictions?

Returns:
(!areDupsOk()  ||  !isNullOk()  ||  getRCLength().isRestricted())

isStrict

public boolean isStrict()

Is this PARDupNullLen as restricted as possible?

Returns:
(!areDupsOk()  ||  !isNullOk()  ||  (getRCLength().getMin() > 0))

toString

public String toString()

Get some information about this PARDupNullLen.

Overrides:
toString in class Object



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