/** * Creates a chunk and saves a copy the original chunk's text. * * @param iseq * the original text. * @param pos * the start position in the text. * @param count * the size of the chunk. */ public Chunk(List<Object> iseq, int pos, int count) { this(pos, count); chunk = slice(iseq, pos, count); }
/** * Creates a chunk and saves a copy the original chunk's text. * * @param iseq * the original text. * @param pos * the start position in the text. * @param count * the size of the chunk. */ public Chunk(final List<Object> iseq, final int pos, final int count) { this(pos, count); chunk = slice(iseq, pos, count); }
/** * Creates a chunk and saves a copy the original chunk's text. * * @param iseq * the original text. * @param pos * the start position in the text. * @param count * the size of the chunk. */ public Chunk(Object[] iseq, int pos, int count) { this(pos, count); chunk = slice(iseq, pos, count); }
/** * Creates a chunk and saves a copy the original chunk's text. * * @param iseq * the original text. * @param pos * the start position in the text. * @param count * the size of the chunk. */ public Chunk(Object[] iseq, int pos, int count) { this(pos, count); chunk = slice(iseq, pos, count); }
/** * Creates a chunk and saves a copy the original chunk's text. * * @param iseq * the original text. * @param pos * the start position in the text. * @param count * the size of the chunk. */ public Chunk(List iseq, int pos, int count) { this(pos, count); chunk = slice(iseq, pos, count); }
/** * Creates a chunk and saves a copy the original chunk's text. * * @param iseq * the original text. * @param pos * the start position in the text. * @param count * the size of the chunk. */ public Chunk(final Object[] iseq, final int pos, final int count) { this(pos, count); chunk = slice(iseq, pos, count); }
/** * Creates a chunk that will be displaced in the resulting text, and saves a copy the original * chunk's text. * * @param iseq * the original text. * @param pos * the start position in the text. * @param count * the size of the chunk. * @param offset * the position the chunk should have in the resulting text. */ public Chunk(List iseq, int pos, int count, int offset) { this(offset, count); chunk = slice(iseq, pos, count); }
/** * Creates a chunk that will be displaced in the resulting text, and saves a copy the original * chunk's text. * * @param iseq * the original text. * @param pos * the start position in the text. * @param count * the size of the chunk. * @param offset * the position the chunk should have in the resulting text. */ public Chunk(final Object[] iseq, final int pos, final int count, final int offset) { this(offset, count); chunk = slice(iseq, pos, count); }
/** * Creates a chunk that will be displaced in the resulting text, and saves a copy the original * chunk's text. * * @param iseq * the original text. * @param pos * the start position in the text. * @param count * the size of the chunk. * @param offset * the position the chunk should have in the resulting text. */ public Chunk(Object[] iseq, int pos, int count, int offset) { this(offset, count); chunk = slice(iseq, pos, count); }
/** * Creates a chunk that will be displaced in the resulting text, and saves a copy the original * chunk's text. * * @param iseq * the original text. * @param pos * the start position in the text. * @param count * the size of the chunk. * @param offset * the position the chunk should have in the resulting text. */ public Chunk(List<Object> iseq, int pos, int count, int offset) { this(offset, count); chunk = slice(iseq, pos, count); }
/** * Creates a chunk that will be displaced in the resulting text, and saves a copy the original * chunk's text. * * @param iseq * the original text. * @param pos * the start position in the text. * @param count * the size of the chunk. * @param offset * the position the chunk should have in the resulting text. */ public Chunk(final List<Object> iseq, final int pos, final int count, final int offset) { this(offset, count); chunk = slice(iseq, pos, count); }
/** * Creates a chunk that will be displaced in the resulting text, and saves a copy the original * chunk's text. * * @param iseq * the original text. * @param pos * the start position in the text. * @param count * the size of the chunk. * @param offset * the position the chunk should have in the resulting text. */ public Chunk(Object[] iseq, int pos, int count, int offset) { this(offset, count); chunk = slice(iseq, pos, count); }
/** * Retrieves a slice from an {@link Object Object} array. * * @param seq * the list to retrieve a slice from. * @param pos * the start position. * @param count * the number of items in the slice. * @return a {@link List List} containing the specified items. */ public static List<Object> slice(final Object[] seq, final int pos, final int count) { return slice(Arrays.asList(seq), pos, count); }
/** * Retrieves a slice from an {@link Object Object} array. * * @param seq * the list to retrieve a slice from. * @param pos * the start position. * @param count * the number of items in the slice. * @return a {@link List List} containing the specified items. */ public static List slice(Object[] seq, int pos, int count) { return slice(Arrays.asList(seq), pos, count); }
/** * Retrieves a slice from an {@link Object Object} array. * * @param seq * the list to retrieve a slice from. * @param pos * the start position. * @param count * the number of items in the slice. * @return a {@link List List} containing the specified items. */ public static List<Object> slice(Object[] seq, int pos, int count) { return slice(Arrays.asList(seq), pos, count); }