org.apache.xerces.impl.validation.datatypes.eTypes.Models
Class PartialOrder

java.lang.Object
  |
  +--org.apache.xerces.impl.validation.datatypes.eTypes.Models.AbstractProperty
        |
        +--org.apache.xerces.impl.validation.datatypes.eTypes.Models.PartialOrder
Direct Known Subclasses:
BasicStringProperty, ISODateTime, mNumber

public abstract class PartialOrder
extends AbstractProperty
implements PO_IF

If the argument is not an instance of the implementing class, the result is false for both gt and lt, and null for those functions which return an object

To implement a concrete partial order, define the compareTo(PO_IF) method of com.ibm.eTypes.Interfaces.PO_IF

Version:
$Id: PartialOrder.java,v 1.1.2.1 2000/10/28 00:04:50 jeffreyr Exp $
Author:
Leonard C. Berman, Jeffrey Rodriguez

Inner classes inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Models.AbstractProperty
AbstractProperty.AbstractSummary
 
Inner classes inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Interfaces.PO_IF
PO_IF.AboveBelow
 
Inner classes inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Interfaces.Property
Property.ValidationSummary
 
Field Summary
static int classNumberSubProperties
           
static int CLOSED_ABOVE
          default is that intervals are closed, i.e.
static int CLOSED_BELOW
          default is that intervals are closed, i.e.
static int MAX
          default has no bound.
static int MIN
          default has no bound.
 
Fields inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Models.AbstractProperty
classNumberSubProperties, ht, required
 
Fields inherited from interface org.apache.xerces.impl.validation.datatypes.eTypes.Interfaces.PO_IF
above, below, classNumberSubProperties, CLOSED_ABOVE, CLOSED_BELOW, MAX, MIN
 
Fields inherited from interface org.apache.xerces.impl.validation.datatypes.eTypes.Interfaces.Property
accumulate, classNumberSubProperties, constraint, eval, instance, merge
 
Constructor Summary
PartialOrder()
           
PartialOrder(java.lang.Class jc, java.lang.String str)
          Constructs a partial order with underlying representation jc and name str
 
Method Summary
abstract  java.lang.Integer compareTo(java.lang.Object other)
          Returns null if this & other are not comparable.
 java.lang.Object getBound(PO_IF.AboveBelow ab, java.lang.Integer type)
           
 boolean getClosed(PO_IF.AboveBelow ab)
          Default is closed
 java.lang.Object glb(java.lang.Object other)
          Greatest lower bound of this and other (or null )
 boolean gt(java.lang.Object other)
          Returns false if the argument is not an instance of the implementing class.
 boolean isBounded(PO_IF.AboveBelow ab)
          Convenience method for getBound( ab , Property.constraint );
 boolean isClosed(PO_IF.AboveBelow ab)
          Convenience method for getClosed( ab , Property.constraint );
 boolean lt(java.lang.Object other)
          Returns false if the argument is not an instance of the implementing class.
 java.lang.Object lub(java.lang.Object other)
          Least upper bound of this and other (or null )
static void merge(PartialOrder accumulator, PO_IF scratchProp, int offset)
           
 void merge(Property scratch)
          this is the accumulator, scratch is the result of checking an instance.
 void setBound(PO_IF.AboveBelow ab, java.lang.Object o, java.lang.Integer type)
          Note that setting o == null, clears bound
 void setClosed(PO_IF.AboveBelow ab, boolean b)
           
 
Methods inherited from class org.apache.xerces.impl.validation.datatypes.eTypes.Models.AbstractProperty
accumulate, add2Report, clone, enableSubProp, getJClass, getName, getPossible, getReport, getSubProp, getSubPropEval, getSubPropMerge, getSubPropName, getSubPropNameIndex, merge, msg, resetAccumulator, resetConstraint, resetInstance, setJClass, setName, setPossible, setRequired, setSubProp, setSubProp, setSubPropEval, setSubPropMerge, setSubPropName, toString, twin, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX

public static final int MAX
default has no bound. Bound is a PO_IF

MIN

public static final int MIN
default has no bound. Bound is a PO_IF

CLOSED_ABOVE

public static final int CLOSED_ABOVE
default is that intervals are closed, i.e. endpoints are included.

CLOSED_BELOW

public static final int CLOSED_BELOW
default is that intervals are closed, i.e. endpoints are included.

classNumberSubProperties

public static final int classNumberSubProperties
Constructor Detail

PartialOrder

public PartialOrder()

PartialOrder

public PartialOrder(java.lang.Class jc,
                    java.lang.String str)
Constructs a partial order with underlying representation jc and name str
Method Detail

compareTo

public abstract java.lang.Integer compareTo(java.lang.Object other)
Description copied from interface: PO_IF
Returns null if this & other are not comparable. Otherwise Integer which is <0, ==0 , or >0 according to whether
this<other, this==other , or this>other
Specified by:
compareTo in interface PO_IF
Tags copied from interface: PO_IF
Parameters:
other - com.ibm.eTypes.Interfaces.PO_IF
Returns:
java.lang.Integer

getBound

public final java.lang.Object getBound(PO_IF.AboveBelow ab,
                                       java.lang.Integer type)
Specified by:
getBound in interface PO_IF

getClosed

public final boolean getClosed(PO_IF.AboveBelow ab)
Default is closed

glb

public final java.lang.Object glb(java.lang.Object other)
Description copied from interface: PO_IF
Greatest lower bound of this and other (or null )
Specified by:
glb in interface PO_IF

gt

public final boolean gt(java.lang.Object other)
Description copied from interface: PO_IF
Returns false if the argument is not an instance of the implementing class. Returns true if compareTo(right).intValue()>0
Specified by:
gt in interface PO_IF

isBounded

public final boolean isBounded(PO_IF.AboveBelow ab)
Convenience method for getBound( ab , Property.constraint );
Specified by:
isBounded in interface PO_IF

isClosed

public final boolean isClosed(PO_IF.AboveBelow ab)
Convenience method for getClosed( ab , Property.constraint );
Specified by:
isClosed in interface PO_IF

lt

public final boolean lt(java.lang.Object other)
Description copied from interface: PO_IF
Returns false if the argument is not an instance of the implementing class. Returns true if compareTo(right).intValue()<0
Specified by:
lt in interface PO_IF

lub

public final java.lang.Object lub(java.lang.Object other)
Description copied from interface: PO_IF
Least upper bound of this and other (or null )
Specified by:
lub in interface PO_IF

merge

public void merge(Property scratch)
this is the accumulator, scratch is the result of checking an instance.

merge

public static void merge(PartialOrder accumulator,
                         PO_IF scratchProp,
                         int offset)

setBound

public void setBound(PO_IF.AboveBelow ab,
                     java.lang.Object o,
                     java.lang.Integer type)
Note that setting o == null, clears bound
Specified by:
setBound in interface PO_IF

setClosed

public void setClosed(PO_IF.AboveBelow ab,
                      boolean b)


Copyright © 1999-2001 Apache XML Project. All Rights Reserved.