Spring Data Core

org.springframework.data.geo
Class Polygon

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

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

Simple value object to represent a Polygon.

Since:
1.8
Author:
Oliver Gierke, Thomas Darimont
See Also:
Serialized Form

Constructor Summary
Polygon(List<? extends Point> points)
          Creates a new Polygon for the given Points.
Polygon(Point x, Point y, Point z, Point... others)
          Creates a new Polygon for the given Points.
 
Method Summary
 boolean equals(Object obj)
           
 List<Point> getPoints()
          Returns all Points the Polygon is made of.
 int hashCode()
           
 Iterator<Point> iterator()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, 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 - must not be null.
y - must not be null.
z - must not be null.
others -

Polygon

public Polygon(List<? extends Point> points)
Creates a new Polygon for the given Points.

Parameters:
points - must not be null.
Method Detail

getPoints

public List<Point> getPoints()
Returns all Points the Polygon is made of.

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

toString

public String toString()
Overrides:
toString in class Object

Spring Data Core

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.