xbn.array.primitive
Class PAROrderDir

java.lang.Object
  |
  +--xbn.XBNObject
        |
        +--xbn.array.primitive.PAROrderDir
All Implemented Interfaces:
Cloneable

public class PAROrderDir
extends XBNObject
implements Cloneable

Configuration for ordering rules to impose onto the PrimitiveArray. This object, as a whole, is provided directly to the PrimitiveArrayRule constructor.

Source code:  PAROrderDir.java


Fields inherited from class xbn.XBNObject
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP
 
Constructor Summary
PAROrderDir()
          Create a PAROrderDir with default settings.
PAROrderDir(boolean b_directionAscDesc)
          Create a PAROrderDir.
PAROrderDir(boolean b_rdrd, boolean b_directionAscDesc)
          Create a PAROrderDir.
 
Method Summary
protected  Object clone()
          Get a full (deep) copy of this PAROrderDir as an Object.
 boolean getDirectionAscDesc()
          If ordering is required, in which direction must the order be?.
 PAROrderDir getPARODClone()
          Get a full (deep) copy of this PAROrderDir.
 boolean isOrdered()
          Is it required for the values in the array to be ordered?
 boolean isRestricted()
          Does this PAROrderDir have any restrictions?
 String toString()
          Get some information about this PAROrderDir.
 
Methods inherited from class xbn.XBNObject
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PAROrderDir

public PAROrderDir()

Create a PAROrderDir with default settings.

Equal to PAROrderDir(false, false)


PAROrderDir

public PAROrderDir(boolean b_directionAscDesc)

Create a PAROrderDir.

Equal to PAROrderDir(true, b_directionAscDesc)


PAROrderDir

public PAROrderDir(boolean b_rdrd,
                   boolean b_directionAscDesc)

Create a PAROrderDir.

Parameters:
b_rdrd - If true, then the array must be ordered, in the direction defined by b_orderAscDesc. If false, the array need not be ordered, and b_orderAscDesc parameter is ignored. See isOrdered.
b_orderAscDesc - When true, the array must be in ascending order (one to ten). If false, the array must be ordered in descending order (ten to one). If b_rdrd is false, this parameter is ignored. See getDirectionAscDesc.
Method Detail

isOrdered

public final boolean isOrdered()

Is it required for the values in the array to be ordered?

Returns:
b_rdrd Exactly as provided to the constructor.

getDirectionAscDesc

public final boolean getDirectionAscDesc()

If ordering is required, in which direction must the order be?. See isOrdered. This function is useless when isOrdered equals false.

Returns:
b_directionAscDesc Exactly as provided to the constructor.

isRestricted

public boolean isRestricted()

Does this PAROrderDir have any restrictions?

Returns:
isOrdered()

toString

public String toString()

Get some information about this PAROrderDir.

Overrides:
toString in class Object

getPARODClone

public final PAROrderDir getPARODClone()

Get a full (deep) copy of this PAROrderDir.

Returns:
(PAROrderDir)clone()

clone

protected Object clone()
                throws CloneNotSupportedException

Get a full (deep) copy of this PAROrderDir as an Object.

Equal to (new PAROrderDir(isOrdered(), getDirectionAscDesc()))

Overrides:
clone 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