public class ContentType extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static ContentType |
any |
static short |
ANY |
static short |
ELEMENT_ONLY |
static ContentType |
elemOnly |
static ContentType |
empty |
static short |
EMPTY |
static ContentType |
mixed |
static short |
MIXED |
static short |
SIMPLE |
static short |
TEXT_ONLY |
static ContentType |
textOnly |
Modifier | Constructor and Description |
---|---|
protected |
ContentType(short type)
Creates a new ContentType.
|
Modifier and Type | Method and Description |
---|---|
short |
getType()
Returns the type of this ContentType
|
String |
toString()
Returns the String representation of this ContentType
|
static ContentType |
valueOf(String contentType)
Creates a new ContentType based on the given String
|
public static final short ELEMENT_ONLY
public static final short MIXED
public static final short EMPTY
public static final short ANY
public static final short SIMPLE
public static final short TEXT_ONLY
public static final ContentType elemOnly
public static final ContentType mixed
public static final ContentType empty
public static final ContentType any
public static final ContentType textOnly
public short getType()
public String toString()
public static ContentType valueOf(String contentType) throws IllegalArgumentException
contentType
- the type of the ContentType to create.
The valid values are as follows: elemOnly, textOnly, mixed, empty, any, simple
IllegalArgumentException
- when the given type is
not one of the possible valid valuesCopyright © 2021. All rights reserved.