|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectca.infoway.messagebuilder.xml.Cardinality
public class Cardinality
A class that models the cardinality of a particular HL7 relationship.
Constructor Summary | |
---|---|
Cardinality(Integer min,
Integer max)
Standard constructor. |
Method Summary | |
---|---|
boolean |
contains(int value)
A convenience method to indicate whether a specified value is contained within the cardinality range. |
static Cardinality |
create(String string)
Parse a cardinality string (such as "*" or "0-50") into a cardinality object. |
boolean |
equals(Object obj)
Determine if this cardinality is equal to another object. |
Integer |
getMax()
Get the maximum value. |
Integer |
getMin()
Get the miniumum value. |
boolean |
isMandatory()
A flag that indicates that the cardinality is at least one. |
boolean |
isMultiple()
A convenience method to see if the maximum cardinality is greater than one. |
boolean |
isSingle()
A convenience method to see if the cardinality of "1" or "0-1". |
String |
toString()
Provide a string representation of the cardinality. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Cardinality(Integer min, Integer max)
Standard constructor.
min
- - the minimum value.max
- - the maximum value.Method Detail |
---|
public Integer getMax()
Get the maximum value.
public Integer getMin()
Get the miniumum value.
public boolean isMandatory()
A flag that indicates that the cardinality is at least one.
public boolean isSingle()
A convenience method to see if the cardinality of "1" or "0-1".
public boolean isMultiple()
A convenience method to see if the maximum cardinality is greater than one.
public boolean equals(Object obj)
Determine if this cardinality is equal to another object.
equals
in class Object
obj
- - the other object
public String toString()
Provide a string representation of the cardinality. (e.g. "0-*", indicating unbounded cardinality.
toString
in class Object
public static Cardinality create(String string)
Parse a cardinality string (such as "*" or "0-50") into a cardinality object.
string
- - the string representation.
public boolean contains(int value)
A convenience method to indicate whether a specified value is contained within the cardinality range.
value
- - the value being specified.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |