Spring Data Document

org.springframework.data.mongodb.core.geo
Class Polygon

java.lang.Object
  extended by org.springframework.data.mongodb.core.geo.Polygon
All Implemented Interfaces:
Iterable<Point>, Shape

public class Polygon
extends Object
implements Shape, Iterable<Point>

Simple value object to represent a Polygon.

Author:
Oliver Gierke

Constructor Summary
Polygon(Point x, Point y, Point z, Point... others)
          Creates a new Polygon for the given Points.
 
Method Summary
 List<List<Double>> asList()
          Returns the Shape as a list of usually Double or Lists of Doubles.
 boolean equals(Object obj)
           
 String getCommand()
          Returns the command to be used to create the $within criterion.
 int hashCode()
           
 Iterator<Point> iterator()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Polygon

public Polygon(Point x,
               Point y,
               Point z,
               Point... others)
Creates a new Polygon for the given Points.

Parameters:
x -
y -
z -
others -
Method Detail

asList

public List<List<Double>> asList()
Description copied from interface: Shape
Returns the Shape as a list of usually Double or Lists of Doubles. Wildcard bound to allow implementations to return a more concrete element type.

Specified by:
asList in interface Shape
Returns:

getCommand

public String getCommand()
Description copied from interface: Shape
Returns the command to be used to create the $within criterion.

Specified by:
getCommand in interface Shape
Returns:

iterator

public Iterator<Point> iterator()
Specified by:
iterator in interface Iterable<Point>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

Spring Data Document

Copyright © 2012. All Rights Reserved.