Module com.github.akurilov.commons
Class CircularListOutput<T>
- java.lang.Object
-
- com.github.akurilov.commons.io.collection.ListOutput<T>
-
- com.github.akurilov.commons.io.collection.CircularListOutput<T>
-
- All Implemented Interfaces:
Output<T>,java.io.Closeable,java.lang.AutoCloseable
public class CircularListOutput<T> extends ListOutput<T>
The items output which may be written infinitely.
-
-
Field Summary
Fields Modifier and Type Field Description protected intcapacityprotected inti-
Fields inherited from class com.github.akurilov.commons.io.collection.ListOutput
items
-
-
Constructor Summary
Constructors Constructor Description CircularListOutput(java.util.List<T> itemList, int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CircularListInput<T>getInput()Make aInputinstance from this.intput(java.util.List<T> buffer, int from, int to)Bulk circular put methodbooleanput(T item)Write the data itemjava.lang.StringtoString()-
Methods inherited from class com.github.akurilov.commons.io.collection.ListOutput
close, put
-
-
-
-
Constructor Detail
-
CircularListOutput
public CircularListOutput(java.util.List<T> itemList, int capacity) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
-
Method Detail
-
put
public boolean put(T item) throws java.io.IOException
Description copied from interface:OutputWrite the data item
-
put
public int put(java.util.List<T> buffer, int from, int to) throws java.io.IOException
Bulk circular put method
-
getInput
public CircularListInput<T> getInput() throws java.io.IOException
Description copied from interface:OutputMake aInputinstance from this.
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classListOutput<T>
-
-