public class Annotation extends java.lang.Object implements java.lang.Comparable<Annotation>, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.String> |
attributes
Deprecated.
|
private static long |
serialVersionUID
Deprecated.
|
private java.lang.String |
type
Deprecated.
|
Constructor and Description |
---|
Annotation(twitter4j.internal.org.json.JSONObject jsonObject)
Deprecated.
Construct an Annotation instance from a JSON Object, returned from Twitter API
Package visibility only!
|
Annotation(java.lang.String type)
Deprecated.
Construct an Annotation with a type but no attributes
|
Annotation(java.lang.String type,
java.util.Map<java.lang.String,java.lang.String> attributes)
Deprecated.
Construct an Annotation with a type and attributes
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(java.lang.String name,
java.lang.String value)
Deprecated.
Adds a single attribute
|
(package private) twitter4j.internal.org.json.JSONObject |
asJSONObject()
Deprecated.
Package visibility only!
Converts this to a JSON object according to Twitter's specification
|
(package private) java.lang.String |
asParameterValue()
Deprecated.
Package visibility only!
|
Annotation |
attribute(java.lang.String name,
java.lang.String value)
Deprecated.
Adds a single attribute
|
Annotation |
attributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Deprecated.
Sets the attributes
Ensures the class's property is not null
|
int |
compareTo(Annotation other)
Deprecated.
|
boolean |
equals(java.lang.Object obj)
Deprecated.
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Deprecated.
|
java.lang.String |
getType()
Deprecated.
|
int |
hashCode()
Deprecated.
|
boolean |
isEmpty()
Deprecated.
|
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Deprecated.
Sets the attributes
Ensures the class's property is not null
|
void |
setType(java.lang.String type)
Deprecated.
Sets the type
Ensures the class's property is not null
|
java.lang.Integer |
size()
Deprecated.
|
private java.util.SortedSet<java.lang.String> |
sortedNames()
Deprecated.
|
java.lang.String |
toString()
Deprecated.
|
Annotation |
type(java.lang.String type)
Deprecated.
Sets the type
Ensures the class's property is not null
|
private static final long serialVersionUID
private java.lang.String type
private java.util.Map<java.lang.String,java.lang.String> attributes
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 Objectpublic java.lang.String getType()
public void setType(java.lang.String type)
type
- - the typepublic Annotation type(java.lang.String type)
type
- - the typepublic 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 attributespublic 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 valuepublic 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()