public class XmlSchemaRestriction
extends java.lang.Object
XmlSchemaFacet. It uses an enum to more easily
work with different facets, and its equals(Object) and
hashCode() reflect that only enumerations and patterns can have
multiple constraints.| Modifier and Type | Class and Description |
|---|---|
static class |
XmlSchemaRestriction.Type
The facet type: one of the known constraining
facets defined by XML Schema.
|
| Modifier and Type | Field and Description |
|---|---|
private boolean |
isFixed |
private XmlSchemaRestriction.Type |
type |
private java.lang.Object |
value |
| Constructor and Description |
|---|
XmlSchemaRestriction(XmlSchemaFacet facet) |
XmlSchemaRestriction(XmlSchemaRestriction.Type type)
Constructs a new
XmlSchemaRestriction from only the XmlSchemaRestriction.Type. |
XmlSchemaRestriction(XmlSchemaRestriction.Type type,
java.lang.Object value,
boolean isFixed)
Constructs a new
XmlSchemaRestriction from the XmlSchemaRestriction.Type,
constraining value, and whether the facet may be overridden by child type
definitions. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Determines equality.
|
XmlSchemaRestriction.Type |
getType()
The constraining facet's
XmlSchemaRestriction.Type. |
java.lang.Object |
getValue()
The facet's constraint value.
|
int |
hashCode()
Generates a hash code based on the contents.
|
boolean |
isFixed()
Whether the constraint value may be overridden in child definitions (
true means it cannot). |
void |
setFixed(boolean isFixed)
Sets whether the constraint value may be overridden in child definitions
(
true means that it cannot). |
void |
setValue(java.lang.Object value)
Sets the constraint value.
|
java.lang.String |
toString()
Returns a
String representation of this facet. |
private XmlSchemaRestriction.Type type
private java.lang.Object value
private boolean isFixed
XmlSchemaRestriction(XmlSchemaFacet facet)
public XmlSchemaRestriction(XmlSchemaRestriction.Type type)
XmlSchemaRestriction from only the XmlSchemaRestriction.Type.type - The facet's type.public XmlSchemaRestriction(XmlSchemaRestriction.Type type, java.lang.Object value, boolean isFixed)
XmlSchemaRestriction from the XmlSchemaRestriction.Type,
constraining value, and whether the facet may be overridden by child type
definitions.type - The constraining facet type.value - The constraining value.isFixed - Whether the value may be overridden in child definitions.public XmlSchemaRestriction.Type getType()
XmlSchemaRestriction.Type.public java.lang.Object getValue()
public boolean isFixed()
true means it cannot).public void setValue(java.lang.Object value)
public void setFixed(boolean isFixed)
true means that it cannot).public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public java.lang.String toString()
String representation of this facet.toString in class java.lang.Object