List of usage examples for twitter4j ResponseList ResponseList
ResponseList
From source file:com.freshdigitable.udonroad.util.TwitterResponseMock.java
License:Apache License
public static ResponseList<Status> createResponseList(final List<Status> list) { return new ResponseList<Status>() { @Override/*from w ww. java 2s.com*/ public RateLimitStatus getRateLimitStatus() { return null; } @Override public void add(int location, Status object) { list.add(location, object); } @Override public boolean add(Status object) { return list.add(object); } @Override public boolean addAll(int location, @NonNull Collection<? extends Status> collection) { return list.addAll(location, collection); } @Override public boolean addAll(@NonNull Collection<? extends Status> collection) { return list.addAll(collection); } @Override public void clear() { list.clear(); } @Override public boolean contains(Object object) { return list.contains(object); } @Override public boolean containsAll(@NonNull Collection<?> collection) { return list.containsAll(collection); } @Override public Status get(int location) { return list.get(location); } @Override public int indexOf(Object object) { return list.indexOf(object); } @Override public boolean isEmpty() { return list.isEmpty(); } @NonNull @Override public Iterator<Status> iterator() { return list.iterator(); } @Override public int lastIndexOf(Object object) { return list.lastIndexOf(object); } @Override public ListIterator<Status> listIterator() { return list.listIterator(); } @NonNull @Override public ListIterator<Status> listIterator(int location) { return list.listIterator(location); } @Override public Status remove(int location) { return list.remove(location); } @Override public boolean remove(Object object) { return list.remove(object); } @Override public boolean removeAll(@NonNull Collection<?> collection) { return list.removeAll(collection); } @Override public boolean retainAll(@NonNull Collection<?> collection) { return list.retainAll(collection); } @Override public Status set(int location, Status object) { return list.set(location, object); } @Override public int size() { return list.size(); } @NonNull @Override public List<Status> subList(int start, int end) { return list.subList(start, end); } @NonNull @Override public Object[] toArray() { return list.toArray(); } @NonNull @Override public <T> T[] toArray(@NonNull T[] array) { return list.toArray(array); } @Override public int getAccessLevel() { return 0; } }; }
From source file:com.michaelfitzmaurice.clocktwerk.ResponseListBuilder.java
License:Apache License
@SuppressWarnings("serial") public ResponseListBuilder() { responseList = new ResponseList<Status>() { @Override//from w ww . j a v a 2 s . co m public int getAccessLevel() { return 0; } @Override public boolean add(Status arg0) { return statusList.add(arg0); } @Override public void add(int arg0, Status arg1) { statusList.add(arg0, arg1); } @Override public boolean addAll(Collection<? extends Status> arg0) { return statusList.addAll(arg0); } @Override public boolean addAll(int arg0, Collection<? extends Status> arg1) { return statusList.addAll(arg0, arg1); } @Override public void clear() { statusList.clear(); } @Override public boolean contains(Object arg0) { return statusList.contains(arg0); } @Override public boolean containsAll(Collection<?> arg0) { return statusList.containsAll(arg0); } @Override public Status get(int arg0) { return statusList.get(arg0); } @Override public int indexOf(Object arg0) { return statusList.indexOf(arg0); } @Override public boolean isEmpty() { return statusList.isEmpty(); } @Override public Iterator<Status> iterator() { return statusList.iterator(); } @Override public int lastIndexOf(Object arg0) { return statusList.lastIndexOf(arg0); } @Override public ListIterator<Status> listIterator() { return statusList.listIterator(); } @Override public ListIterator<Status> listIterator(int arg0) { return statusList.listIterator(arg0); } @Override public boolean remove(Object arg0) { return statusList.remove(arg0); } @Override public Status remove(int arg0) { return statusList.remove(arg0); } @Override public boolean removeAll(Collection<?> arg0) { return statusList.remove(arg0); } @Override public boolean retainAll(Collection<?> arg0) { return statusList.retainAll(arg0); } @Override public Status set(int arg0, Status arg1) { return statusList.set(arg0, arg1); } @Override public int size() { return statusList.size(); } @Override public List<Status> subList(int arg0, int arg1) { return statusList.subList(arg0, arg1); } @Override public Object[] toArray() { return statusList.toArray(); } @Override public <T> T[] toArray(T[] arg0) { return statusList.toArray(arg0); } @Override public RateLimitStatus getRateLimitStatus() { return null; } }; }