// Path: android-maps-extensions/src/main/java/com/androidmapsextensions/Circle.java
// public interface Circle {
// 
//     boolean contains(LatLng position);
// 
//     LatLng getCenter();
// 
//     <T> T getData();
// 
//     int getFillColor();
// 
//     @Deprecated
//     String getId();
// 
//     double getRadius();
// 
//     int getStrokeColor();
// 
//     List<PatternItem> getStrokePattern();
// 
//     float getStrokeWidth();
// 
//     Object getTag();
// 
//     float getZIndex();
// 
//     boolean isClickable();
// 
//     boolean isVisible();
// 
//     void remove();
// 
//     void setCenter(LatLng center);
// 
//     void setClickable(boolean clickable);
// 
//     void setData(Object data);
// 
//     void setFillColor(int fillColor);
// 
//     void setRadius(double radius);
// 
//     void setStrokeColor(int strokeColor);
// 
//     void setStrokePattern(List<PatternItem> strokePattern);
// 
//     void setStrokeWidth(float strokeWidth);
// 
//     void setTag(Object tag);
// 
//     void setVisible(boolean visible);
// 
//     void setZIndex(float zIndex);
// }
// 
// Path: android-maps-extensions/src/main/java/com/androidmapsextensions/utils/LatLngUtils.java
// public final class LatLngUtils {
// 
//     private LatLngUtils() {
//     }
// 
//     public static float distanceBetween(LatLng first, LatLng second) {
//         float[] distance = new float[1];
//         Location.distanceBetween(first.latitude, first.longitude, second.latitude, second.longitude, distance);
//         return distance[0];
//     }
// 
//     public static LatLng fromLocation(Location location) {
//         return new LatLng(location.getLatitude(), location.getLongitude());
//     }
// }


import com.androidmapsextensions.Circle;
import com.androidmapsextensions.utils.LatLngUtils;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.PatternItem;
import java.util.List;
/*
 * Copyright (C) 2013 Maciej Górski
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.androidmapsextensions.impl;



class DelegatingCircle implements Circle {

    private com.google.android.gms.maps.model.Circle real;
    private CircleManager manager;

    private Object data;

    DelegatingCircle(com.google.android.gms.maps.model.Circle real, CircleManager manager) {
        this.real = real;
        this.manager = manager;
    }

    @Override
    public boolean contains(LatLng position) {
        LatLng center = getCenter();
        double radius = getRadius();
// Path: android-maps-extensions/src/main/java/com/androidmapsextensions/Circle.java
// public interface Circle {
// 
//     boolean contains(LatLng position);
// 
//     LatLng getCenter();
// 
//     <T> T getData();
// 
//     int getFillColor();
// 
//     @Deprecated
//     String getId();
// 
//     double getRadius();
// 
//     int getStrokeColor();
// 
//     List<PatternItem> getStrokePattern();
// 
//     float getStrokeWidth();
// 
//     Object getTag();
// 
//     float getZIndex();
// 
//     boolean isClickable();
// 
//     boolean isVisible();
// 
//     void remove();
// 
//     void setCenter(LatLng center);
// 
//     void setClickable(boolean clickable);
// 
//     void setData(Object data);
// 
//     void setFillColor(int fillColor);
// 
//     void setRadius(double radius);
// 
//     void setStrokeColor(int strokeColor);
// 
//     void setStrokePattern(List<PatternItem> strokePattern);
// 
//     void setStrokeWidth(float strokeWidth);
// 
//     void setTag(Object tag);
// 
//     void setVisible(boolean visible);
// 
//     void setZIndex(float zIndex);
// }
// 
// Path: android-maps-extensions/src/main/java/com/androidmapsextensions/utils/LatLngUtils.java
// public final class LatLngUtils {
// 
//     private LatLngUtils() {
//     }
// 
//     public static float distanceBetween(LatLng first, LatLng second) {
//         float[] distance = new float[1];
//         Location.distanceBetween(first.latitude, first.longitude, second.latitude, second.longitude, distance);
//         return distance[0];
//     }
// 
//     public static LatLng fromLocation(Location location) {
//         return new LatLng(location.getLatitude(), location.getLongitude());
//     }
// }


// Path: android-maps-extensions/src/main/java/com/androidmapsextensions/impl/DelegatingCircle.java
import com.androidmapsextensions.Circle;
import com.androidmapsextensions.utils.LatLngUtils;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.PatternItem;
import java.util.List;

/*
 * Copyright (C) 2013 Maciej Górski
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.androidmapsextensions.impl;



class DelegatingCircle implements Circle {

    private com.google.android.gms.maps.model.Circle real;
    private CircleManager manager;

    private Object data;

    DelegatingCircle(com.google.android.gms.maps.model.Circle real, CircleManager manager) {
        this.real = real;
        this.manager = manager;
    }

    @Override
    public boolean contains(LatLng position) {
        LatLng center = getCenter();
        double radius = getRadius();
        float distance = LatLngUtils.distanceBetween(position, center);