|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<User>
winterwell.jtwitter.TwitterList
public class TwitterList
A Twitter list, which uses lazy-fetching of its members.
The methods of this object will call Twitter when they need to, and store the
results. E.g. the first call to size() might require a call to
Twitter, but subsequent calls will not.
WARNING: Twitter only returns list members in batches of 20. So reading a large list can be slow and use quite a few calls to Twitter.
To find out what lists you or another user has, see
Twitter.getLists() and Twitter.getLists(String).
To find out what lists you or another user are *in*, see
Twitter.getListsContainingMe() and
Twitter.getListsContaining(String, boolean).
Twitter| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
TwitterList(java.lang.String ownerScreenName,
java.lang.String slug,
Twitter jtwit)
Deprecated. Due to the potential for confusion with TwitterList(String, Twitter, boolean, String) Use
get(String, String, Twitter) instead. |
|
TwitterList(java.lang.String listName,
Twitter jtwit,
boolean isPublic,
java.lang.String description)
CREATE a brand new Twitter list. |
|
| Method Summary | |
|---|---|
boolean |
add(User user)
Add a user to the list. |
boolean |
addAll(java.util.Collection<? extends User> newUsers)
|
void |
delete()
Delete this list! |
User |
get(int index)
|
static TwitterList |
get(java.lang.String ownerScreenName,
java.lang.String slug,
Twitter jtwit)
A lazy-loading list viewer. |
java.lang.String |
getDescription()
|
java.lang.String |
getName()
|
User |
getOwner()
|
java.util.List<Status> |
getStatuses()
Returns a list of statuses from this list. |
int |
getSubscriberCount()
|
java.util.List<User> |
getSubscribers()
|
boolean |
isPrivate()
|
boolean |
remove(java.lang.Object o)
Remove a user from the list. |
void |
setDescription(java.lang.String description)
|
void |
setPrivate(boolean isPrivate)
|
int |
size()
|
java.lang.String |
toString()
|
| Methods inherited from class java.util.AbstractList |
|---|
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
@Deprecated
public TwitterList(java.lang.String ownerScreenName,
java.lang.String slug,
Twitter jtwit)
TwitterList(String, Twitter, boolean, String) Use
get(String, String, Twitter) instead.
owner - .screenName The Twitter screen-name for the list's owner.slug - The list's name. Technically the slug and the name needn't be
the same, but they usually are.jtwit - a JTwitter object (this must be able to authenticate).
Twitter.Exception.E404 - if the list does not existwhich creates new
lists.
public TwitterList(java.lang.String listName,
Twitter jtwit,
boolean isPublic,
java.lang.String description)
listName - The list's name.jtwit - a JTwitter object (this must be able to authenticate).description - A description for this list. Can be null.which views existing lists.| Method Detail |
|---|
public static TwitterList get(java.lang.String ownerScreenName,
java.lang.String slug,
Twitter jtwit)
ownerScreenName - owner - .screenName The Twitter screen-name for the list's owner.slug - The list's name. Technically the slug and the name needn't be
the same, but they usually are.jtwit - a JTwitter object (this must be able to authenticate).
Twitter.Exception.E404 - if the list does not existpublic boolean add(User user)
add in interface java.util.Collection<User>add in interface java.util.List<User>add in class java.util.AbstractList<User>public boolean addAll(java.util.Collection<? extends User> newUsers)
addAll in interface java.util.Collection<User>addAll in interface java.util.List<User>addAll in class java.util.AbstractCollection<User>public void delete()
TwitterException - on failurepublic User get(int index)
get in interface java.util.List<User>get in class java.util.AbstractList<User>public java.lang.String getDescription()
public java.lang.String getName()
public User getOwner()
public java.util.List<Status> getStatuses()
throws TwitterException
TwitterExceptionpublic int getSubscriberCount()
public java.util.List<User> getSubscribers()
public boolean isPrivate()
public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<User>remove in interface java.util.List<User>remove in class java.util.AbstractCollection<User>public void setDescription(java.lang.String description)
public void setPrivate(boolean isPrivate)
public int size()
size in interface java.util.Collection<User>size in interface java.util.List<User>size in class java.util.AbstractCollection<User>public java.lang.String toString()
toString in class java.util.AbstractCollection<User>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||