T
- public class MemoryTwitterStatusList<T extends USMFStatus> extends ArrayList<T> implements TwitterStatusList<T>
USMFStatus
instances held in memory (backed by an ArrayList
.)modCount
Constructor and Description |
---|
MemoryTwitterStatusList()
an empty list
|
MemoryTwitterStatusList(Collection<T> c)
Consume a collection into this list
|
Modifier and Type | Method and Description |
---|---|
String |
asciiHeader()
Header for ascii output.
|
byte[] |
binaryHeader()
Header for binary output.
|
MemoryTwitterStatusList<T> |
randomSubList(int nelem)
Extract a sublist made up of nelem elements from the this list.
|
static <T extends USMFStatus> |
read(BufferedInputStream is,
int nTweets,
Class<T> clazz,
Class<? extends GeneralJSON> readClass) |
static MemoryTwitterStatusList<USMFStatus> |
read(File f) |
static <T extends USMFStatus> |
read(File f,
Class<T> clazz) |
static MemoryTwitterStatusList<USMFStatus> |
read(InputStream is,
int nStatus) |
static <T extends USMFStatus> |
read(InputStream is,
int nStatus,
Class<T> clazz,
Class<? extends GeneralJSON> readClass) |
void |
writeASCII(PrintWriter out)
Write the content of this as ascii to out.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
parallelStream, removeIf, stream
public MemoryTwitterStatusList(Collection<T> c)
c
- public MemoryTwitterStatusList()
public MemoryTwitterStatusList<T> randomSubList(int nelem)
RandomisableList
randomSubList
in interface RandomisableList<T extends USMFStatus>
nelem
- number of elements to extractpublic void writeASCII(PrintWriter out) throws IOException
WriteableASCII
writeASCII
in interface WriteableASCII
out
- sink to write toIOException
- an error writing to outpublic String asciiHeader()
WriteableASCII
asciiHeader
in interface WriteableASCII
public static MemoryTwitterStatusList<USMFStatus> read(File f) throws IOException
f
- USMFStatus
instances into memory (i.e. formated as USMF)IOException
public static <T extends USMFStatus> MemoryTwitterStatusList<T> read(File f, Class<T> clazz) throws IOException
T
- f
- clazz
- USMFStatus
instances held ass clazz instancesIOException
public static MemoryTwitterStatusList<USMFStatus> read(InputStream is, int nStatus) throws IOException
is
- nStatus
- IOException
public static <T extends USMFStatus> MemoryTwitterStatusList<T> read(InputStream is, int nStatus, Class<T> clazz, Class<? extends GeneralJSON> readClass) throws IOException
T
- is
- nStatus
- clazz
- readClass
- MemoryTwitterStatusList
held as clazz instances and read as readClass instancesIOException
public static <T extends USMFStatus> MemoryTwitterStatusList<T> read(BufferedInputStream is, int nTweets, Class<T> clazz, Class<? extends GeneralJSON> readClass) throws IOException
T
- is
- nTweets
- clazz
- readClass
- MemoryTwitterStatusList
held as clazz instances and read as readClass instancesIOException
public void writeBinary(DataOutput out) throws IOException
WriteableBinary
writeBinary
in interface WriteableBinary
out
- sink to write toIOException
- an error writing to outpublic byte[] binaryHeader()
WriteableBinary
binaryHeader
in interface WriteableBinary