public class GapLists
extends org.magicwerk.brownies.collections.primitive.GapListPrimitives
| Constructor and Description |
|---|
GapLists() |
| Modifier and Type | Method and Description |
|---|---|
static void |
add(java.lang.CharSequence str,
org.magicwerk.brownies.collections.primitive.CharGapList list,
int start,
int end)
Add specified number of chars from CharSequence into CharGapList.
|
static IList<?> |
createWrapperList(java.lang.Class<?> type)
Create a GapList wrapping a primitive GapList, e.g. an IntObjGapList wrapping an IntGapList.
|
static IList<?> |
createWrapperList(java.lang.Class<?> type,
int capacity)
Create a GapList wrapping a primitive GapList, e.g. an IntObjGapList wrapping an IntGapList.
|
static int |
read(java.io.InputStream istream,
org.magicwerk.brownies.collections.primitive.ByteGapList list,
int len)
Read specified number of bytes from InputStream into ByteGapList.
|
static int |
read(java.io.Reader reader,
org.magicwerk.brownies.collections.primitive.CharGapList list,
int len)
Read specified number of chars from Reader into CharGapList.
|
static <T> java.util.stream.Collector<T,?,BigList<T>> |
toBigList()
Return collector which collects the elements into a
BigList. |
static <T> java.util.stream.Collector<T,?,GapList<T>> |
toGapList()
Return collector which collects the elements into a
GapList. |
public static IList<?> createWrapperList(java.lang.Class<?> type)
type - primitive type for GapListjava.lang.IllegalArgumentException - if no primitive type is specifiedpublic static IList<?> createWrapperList(java.lang.Class<?> type, int capacity)
type - primitive type for GapListcapacity - initial capacity of created listjava.lang.IllegalArgumentException - if no primitive type is specifiedpublic static <T> java.util.stream.Collector<T,?,GapList<T>> toGapList()
GapList.public static <T> java.util.stream.Collector<T,?,BigList<T>> toBigList()
BigList.public static int read(java.io.InputStream istream,
org.magicwerk.brownies.collections.primitive.ByteGapList list,
int len)
throws java.io.IOException
istream - input stream (source)list - list (target)len - maximum number of bytes to readjava.io.IOExceptionpublic static int read(java.io.Reader reader,
org.magicwerk.brownies.collections.primitive.CharGapList list,
int len)
throws java.io.IOException
reader - reader (source)list - list (target)len - maximum number of bytes to readjava.io.IOExceptionpublic static void add(java.lang.CharSequence str,
org.magicwerk.brownies.collections.primitive.CharGapList list,
int start,
int end)
str - CharSequence (source)list - list (target)start - start position of characters to add in CharSequenceend - end position of characters to add in CharSequence