bibliothek.util
Interface PathCombiner


public interface PathCombiner

Generic algorithm to combine two Paths into one Path.

Author:
Benjamin Sigg

Field Summary
static PathCombiner APPEND
          This combiner uses Path.append(Path) to combine its paths.
static PathCombiner SECOND
          This combiner always discards the first path and just returns the second.
static PathCombiner UNIQUE
          This combiner uses Path.uniqueAppend(Path) to combine its paths.
 
Method Summary
 Path combine(Path first, Path second)
          Creates a combination of first and of second.
 

Field Detail

APPEND

static final PathCombiner APPEND
This combiner uses Path.append(Path) to combine its paths.


UNIQUE

static final PathCombiner UNIQUE
This combiner uses Path.uniqueAppend(Path) to combine its paths.


SECOND

static final PathCombiner SECOND
This combiner always discards the first path and just returns the second.

Method Detail

combine

Path combine(Path first,
             Path second)
Creates a combination of first and of second. It is up to this combiner how the combination looks. This method must respect only one condition: combine( x, y ) = combine( x, y ) must be true for all times.

Parameters:
first - the first part of the path, not null
second - the second part of the path, not null
Returns:
the result, not null