[android] #4320 - rename including to contains
This commit is contained in:
@@ -162,7 +162,7 @@ public class LatLngBounds implements Parcelable {
|
||||
* @param latLng the point which may be contained
|
||||
* @return true, if the point is contained within the box.
|
||||
*/
|
||||
public boolean including(final ILatLng latLng) {
|
||||
public boolean contains(final ILatLng latLng) {
|
||||
final double latitude = latLng.getLatitude();
|
||||
final double longitude = latLng.getLongitude();
|
||||
return ((latitude < this.mLatNorth)
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.mapbox.mapboxsdk.geometry;
|
||||
|
||||
import com.mapbox.mapboxsdk.exceptions.InvalidLatLngBoundsException;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -100,12 +99,12 @@ public class LatLngBoundsTest {
|
||||
|
||||
@Test
|
||||
public void testIncluding() {
|
||||
assertTrue("LatLng should be included", mLatLngBounds.including(new LatLng(1, 1)));
|
||||
assertTrue("LatLng should be included", mLatLngBounds.contains(new LatLng(1, 1)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNoIncluding() {
|
||||
assertFalse("LatLng should not be included", mLatLngBounds.including(new LatLng(3, 1)));
|
||||
assertFalse("LatLng should not be included", mLatLngBounds.contains(new LatLng(3, 1)));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user