public class UmlMultiplicity
extends java.lang.Object
parseBounds(String, String)
to obtain one of those standard ones, or whatever is defined
as custom. For validation purposes, use isCustom()
to identify custom ones that should
be fixed in the model.Modifier and Type | Class and Description |
---|---|
static class |
UmlMultiplicity.Kind
Facilitates handling of IEC61850 class constraints (to ignore presence condition literals
which must be printed in the documentation, but are not actually used as constraints, rather
deduced from multiplicity of attribute).
|
Modifier and Type | Field and Description |
---|---|
private boolean |
_isCustom |
private java.lang.String |
_lower |
private java.lang.String |
_upper |
static UmlMultiplicity |
EMPTY |
static UmlMultiplicity |
ONE |
static UmlMultiplicity |
ONE_TO_MANY |
static UmlMultiplicity |
OPT_MANY |
static UmlMultiplicity |
OPT_ONE |
Modifier | Constructor and Description |
---|---|
private |
UmlMultiplicity(java.lang.String lower,
java.lang.String upper,
boolean isCustom) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBounds() |
java.lang.String |
getLower() |
java.lang.String |
getUpper() |
boolean |
isCustom()
Returns whether this is a custom instance returned from
parseBounds(String, String)
that should be fixed in the EA model. |
boolean |
isMultivalue()
Returns true if the upper bound is not empty and different than 1.
|
boolean |
isOptional()
Returns true if the lower bound is 0 or empty.
|
static UmlMultiplicity |
parseBounds(java.lang.String lower,
java.lang.String upper)
Returns multiplicity object from lower and upper bounds
|
static UmlMultiplicity |
parseFromString(java.lang.String mult)
Returns multiplicity object from formatted string "lower..upper".
|
java.lang.String |
toString() |
public static final UmlMultiplicity ONE
public static final UmlMultiplicity ONE_TO_MANY
public static final UmlMultiplicity OPT_ONE
public static final UmlMultiplicity OPT_MANY
public static final UmlMultiplicity EMPTY
private final java.lang.String _lower
private final java.lang.String _upper
private final boolean _isCustom
private UmlMultiplicity(java.lang.String lower, java.lang.String upper, boolean isCustom)
public java.lang.String getLower()
public java.lang.String getUpper()
public boolean isCustom()
parseBounds(String, String)
that should be fixed in the EA model.public boolean isOptional()
public boolean isMultivalue()
public static UmlMultiplicity parseBounds(java.lang.String lower, java.lang.String upper)
public static UmlMultiplicity parseFromString(java.lang.String mult)
public java.lang.String getBounds()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright 2009-2015 Tatjana (Tanja) Kostic