org.shapelogic.polygon
Class AnnotatedShapeImplementation

java.lang.Object
  extended by org.shapelogic.polygon.AnnotatedShapeImplementation
All Implemented Interfaces:
AnnotatedShape

public class AnnotatedShapeImplementation
extends java.lang.Object
implements AnnotatedShape

Instead putting all logic for AnnotatedShape in all classes implement this Make them adapter for this class I can make the map a lazy init map

Author:
Sami Badawi

Field Summary
protected  java.util.Map<java.lang.Object,java.util.Set<GeometricShape2D>> _map
           
 
Constructor Summary
AnnotatedShapeImplementation()
           
AnnotatedShapeImplementation(AnnotatedShape annotatedShape)
           
 
Method Summary
 AnnotatedShapeImplementation getAnnotatedShape()
           
 java.util.Set<java.lang.Object> getAnnotationForShapes(GeometricShape2D shape)
           
 java.util.Map<java.lang.Object,java.util.Set<GeometricShape2D>> getMap()
           
 java.util.Set<GeometricShape2D> getShapesForAnnotation(java.lang.Object annotation)
           
 void putAllAnnotation(GeometricShape2D shape, java.util.Set annotationKeySet)
           
 void putAnnotation(GeometricShape2D shape, java.lang.Object annotationKey)
           
 void setup()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_map

protected java.util.Map<java.lang.Object,java.util.Set<GeometricShape2D>> _map
Constructor Detail

AnnotatedShapeImplementation

public AnnotatedShapeImplementation()

AnnotatedShapeImplementation

public AnnotatedShapeImplementation(AnnotatedShape annotatedShape)
Method Detail

getMap

public java.util.Map<java.lang.Object,java.util.Set<GeometricShape2D>> getMap()
Specified by:
getMap in interface AnnotatedShape

putAnnotation

public void putAnnotation(GeometricShape2D shape,
                          java.lang.Object annotationKey)
Specified by:
putAnnotation in interface AnnotatedShape

setup

public void setup()
Specified by:
setup in interface AnnotatedShape

getAnnotatedShape

public AnnotatedShapeImplementation getAnnotatedShape()
Specified by:
getAnnotatedShape in interface AnnotatedShape

getShapesForAnnotation

public java.util.Set<GeometricShape2D> getShapesForAnnotation(java.lang.Object annotation)
Specified by:
getShapesForAnnotation in interface AnnotatedShape

getAnnotationForShapes

public java.util.Set<java.lang.Object> getAnnotationForShapes(GeometricShape2D shape)
Specified by:
getAnnotationForShapes in interface AnnotatedShape

putAllAnnotation

public void putAllAnnotation(GeometricShape2D shape,
                             java.util.Set annotationKeySet)
Specified by:
putAllAnnotation in interface AnnotatedShape


Copyright © 2009. All Rights Reserved.