org.openstreetmap.fma.jtiledownloader.datatypes
Class TileComparatorFactory

java.lang.Object
  extended by org.openstreetmap.fma.jtiledownloader.datatypes.TileComparatorFactory

public class TileComparatorFactory
extends java.lang.Object

This class compares two tiles in three possible ways:

  1. Simply by order, z -> x -> y.
  2. By quad-tiles, z -> (quad x) -> (quad y) -> x -> y.
  3. By quad-tiles recursively (not supported yet — I have no idea how).

Author:
zverik

Nested Class Summary
private static class TileComparatorFactory.QuadComparator
          Inner class QuadComparator
private static class TileComparatorFactory.RecursiveComparator
           
private static class TileComparatorFactory.SimpleComparator
          Inner class SimpleComparator
 
Field Summary
private static java.util.Comparator<Tile>[] comparators
           
static int COMPARE_COUNT
           
static int COMPARE_DONT
           
static int COMPARE_QUAD
           
static int COMPARE_RECURSIVE
           
static int COMPARE_SIMPLE
           
 
Constructor Summary
TileComparatorFactory()
           
 
Method Summary
static java.util.Comparator<Tile> getComparator(int type)
           
static void sortTileList(java.util.List<Tile> tileList)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPARE_DONT

public static final int COMPARE_DONT
See Also:
Constant Field Values

COMPARE_SIMPLE

public static final int COMPARE_SIMPLE
See Also:
Constant Field Values

COMPARE_QUAD

public static final int COMPARE_QUAD
See Also:
Constant Field Values

COMPARE_RECURSIVE

public static final int COMPARE_RECURSIVE
See Also:
Constant Field Values

COMPARE_COUNT

public static final int COMPARE_COUNT
See Also:
Constant Field Values

comparators

private static java.util.Comparator<Tile>[] comparators
Constructor Detail

TileComparatorFactory

public TileComparatorFactory()
Method Detail

getComparator

public static java.util.Comparator<Tile> getComparator(int type)

sortTileList

public static void sortTileList(java.util.List<Tile> tileList)