org.xwiki.diff
Interface Chunk<E>

Type Parameters:
E - the type of compared elements

public interface Chunk<E>

A snippet of the source list.

Version:
$Id: 20ce6eed17b70b1162b4ec4d99c52dc6e5dc06be $

Method Summary
 List<E> getElements()
           
 int getIndex()
           
 int getLastIndex()
           
 void setElements(List<E> elements)
           
 int size()
           
 void verify(List<E> target)
          Verify that the chunk can be found in the provided list.
 

Method Detail

verify

void verify(List<E> target)
            throws PatchException
Verify that the chunk can be found in the provided list.

Parameters:
target - the list where to match the chunk
Throws:
PatchException - fail to match the chunk

getElements

List<E> getElements()
Returns:
the elements in the snippet

setElements

void setElements(List<E> elements)
Parameters:
elements - the elements in the snippet

size

int size()
Returns:
the size of the snippet

getIndex

int getIndex()
Returns:
the start index of the chunk in the list

getLastIndex

int getLastIndex()
Returns:
the index of the last element of the chunk in the list


Copyright © 2004-2013 XWiki. All Rights Reserved.