|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttwitter4j.Annotation
public class Annotation
A data class representing an Annotation of a Status or a Tweet
Field Summary | |
---|---|
private java.util.Map<java.lang.String,java.lang.String> |
attributes
|
private static long |
serialVersionUID
|
private java.lang.String |
type
|
Constructor Summary | |
---|---|
Annotation(twitter4j.internal.org.json.JSONObject jsonObject)
Construct an Annotation instance from a JSON Object, returned from Twitter API Package visibility only! |
|
Annotation(java.lang.String type)
Construct an Annotation with a type but no attributes |
|
Annotation(java.lang.String type,
java.util.Map<java.lang.String,java.lang.String> attributes)
Construct an Annotation with a type and attributes |
Method Summary | |
---|---|
void |
addAttribute(java.lang.String name,
java.lang.String value)
Adds a single attribute |
(package private) twitter4j.internal.org.json.JSONObject |
asJSONObject()
Package visibility only! Converts this to a JSON object according to Twitter's specification |
(package private) java.lang.String |
asParameterValue()
Package visibility only! |
Annotation |
attribute(java.lang.String name,
java.lang.String value)
Adds a single attribute |
Annotation |
attributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Sets the attributes Ensures the class's property is not null |
int |
compareTo(Annotation other)
|
boolean |
equals(java.lang.Object obj)
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
|
java.lang.String |
getType()
|
int |
hashCode()
|
boolean |
isEmpty()
|
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Sets the attributes Ensures the class's property is not null |
void |
setType(java.lang.String type)
Sets the type Ensures the class's property is not null |
java.lang.Integer |
size()
|
private java.util.SortedSet<java.lang.String> |
sortedNames()
|
java.lang.String |
toString()
|
Annotation |
type(java.lang.String type)
Sets the type Ensures the class's property is not null |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private java.lang.String type
private java.util.Map<java.lang.String,java.lang.String> attributes
Constructor Detail |
---|
public Annotation(java.lang.String type)
type
- - the typepublic Annotation(java.lang.String type, java.util.Map<java.lang.String,java.lang.String> attributes)
type
- attributes
- Annotation(twitter4j.internal.org.json.JSONObject jsonObject)
jsonObject
- - the JSON ObjectMethod Detail |
---|
public java.lang.String getType()
public void setType(java.lang.String type)
type
- - the typepublic Annotation type(java.lang.String type)
type
- - the type
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
attributes
- - the attributespublic Annotation attributes(java.util.Map<java.lang.String,java.lang.String> attributes)
attributes
- - the attributes
public void addAttribute(java.lang.String name, java.lang.String value)
name
- - the attribute namevalue
- - the attribute valuepublic Annotation attribute(java.lang.String name, java.lang.String value)
name
- - the attribute namevalue
- - the attribute value
public boolean isEmpty()
public java.lang.Integer size()
java.lang.String asParameterValue()
twitter4j.internal.org.json.JSONObject asJSONObject()
public int compareTo(Annotation other)
compareTo
in interface java.lang.Comparable<Annotation>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
private java.util.SortedSet<java.lang.String> sortedNames()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |