public abstract class Element<T>
extends java.lang.Object
When retrieving content items or content types, you get an elements collection as a part of the retrieved item or type.
| Constructor and Description |
|---|
Element() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(java.lang.Object other) |
boolean |
equals(java.lang.Object o) |
java.lang.String |
getCodeName()
The codename for this element
|
java.lang.String |
getName()
Display name of the element
|
ContentItem |
getParent()
A reference to the parent ContentItem to this element.
|
java.lang.String |
getType()
Type of the element
|
abstract T |
getValue()
Returns the value of the element.
|
int |
hashCode() |
void |
setCodeName(java.lang.String codeName)
The codename for this element
|
void |
setName(java.lang.String name)
Display name of the element
|
void |
setParent(ContentItem parent)
A reference to the parent ContentItem to this element.
|
void |
setType(java.lang.String type)
Type of the element
|
java.lang.String |
toString() |
public abstract T getValue()
public java.lang.String getType()
Valid values: text, rich_text, number, multiple_choice, date_time, asset, modular_content
(LinkedItem), taxonomy, url_slug.
public java.lang.String getName()
public java.lang.String getCodeName()
Note: This is only populated when querying an individual content type element.
DeliveryClient.getContentTypeElement(String, String),
DeliveryClient.getContentTypeElement(String, String, List)public ContentItem getParent()
public void setType(java.lang.String type)
Valid values: text, rich_text, number, multiple_choice, date_time, asset, modular_content
(LinkedItem), taxonomy, url_slug.
type - the type of elementpublic void setName(java.lang.String name)
name - the name of this elementpublic void setCodeName(java.lang.String codeName)
Note: This is only populated when querying an individual content type element.
codeName - the codename of this elementDeliveryClient.getContentTypeElement(String, String),
DeliveryClient.getContentTypeElement(String, String, List)public void setParent(ContentItem parent)
parent - the parent to thispublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode in class java.lang.Object