target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testCentralWithProfiles() throws Exception { SettingsBuilder settingsBuilder = new DefaultSettingsBuilderFactory().newInstance(); SettingsBuildingRequest settingsRequest = new DefaultSettingsBuildingRequest(); settingsRequest.setUserSettingsFile(new File("src/test/resources/profiles/settings.xml")); S...
public static List<RemoteRepository> getRemoteRepositories(MavenContainer container, Settings settings) { Set<RemoteRepository> remoteRepos = new HashSet<>(); remoteRepos.addAll(container.getEnabledRepositoriesFromProfile(settings)); String centralRepoURL = getCentralMirrorURL(settings).orElse(MAVEN_CENTRAL_REPO); remo...
MavenRepositories { public static List<RemoteRepository> getRemoteRepositories(MavenContainer container, Settings settings) { Set<RemoteRepository> remoteRepos = new HashSet<>(); remoteRepos.addAll(container.getEnabledRepositoriesFromProfile(settings)); String centralRepoURL = getCentralMirrorURL(settings).orElse(MAVEN...
MavenRepositories { public static List<RemoteRepository> getRemoteRepositories(MavenContainer container, Settings settings) { Set<RemoteRepository> remoteRepos = new HashSet<>(); remoteRepos.addAll(container.getEnabledRepositoriesFromProfile(settings)); String centralRepoURL = getCentralMirrorURL(settings).orElse(MAVEN...
MavenRepositories { public static List<RemoteRepository> getRemoteRepositories(MavenContainer container, Settings settings) { Set<RemoteRepository> remoteRepos = new HashSet<>(); remoteRepos.addAll(container.getEnabledRepositoriesFromProfile(settings)); String centralRepoURL = getCentralMirrorURL(settings).orElse(MAVEN...
MavenRepositories { public static List<RemoteRepository> getRemoteRepositories(MavenContainer container, Settings settings) { Set<RemoteRepository> remoteRepos = new HashSet<>(); remoteRepos.addAll(container.getEnabledRepositoriesFromProfile(settings)); String centralRepoURL = getCentralMirrorURL(settings).orElse(MAVEN...
@Test public void testSingleValue() { String[] data = new String[] { "a" }; int index = 0; String[] result = Arrays.removeElementAtIndex(data, index); Assert.assertEquals(1, data.length); Assert.assertEquals(0, result.length); }
public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index && index ...
Arrays { public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index ...
Arrays { public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index ...
Arrays { public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index ...
Arrays { public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index ...
@Test public void testRemoveElementAtIndex() { String[] data = new String[] { "a", "b", "c", "d", "e" }; int index = 2; String[] result = Arrays.removeElementAtIndex(data, index); Assert.assertEquals(data[0], result[0]); Assert.assertEquals(data[1], result[1]); Assert.assertEquals(data[3], result[2]); Assert.assertEqua...
public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index && index ...
Arrays { public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index ...
Arrays { public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index ...
Arrays { public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index ...
Arrays { public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index ...
@Test public void testRemoveElementAtLastIndex() { String[] data = new String[] { "a", "b", "c", "d", "e" }; int index = 4; String[] result = Arrays.removeElementAtIndex(data, index); Assert.assertEquals(data[0], result[0]); Assert.assertEquals(data[1], result[1]); Assert.assertEquals(data[2], result[2]); Assert.assert...
public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index && index ...
Arrays { public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index ...
Arrays { public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index ...
Arrays { public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index ...
Arrays { public static <ELEMENTTYPE> ELEMENTTYPE[] removeElementAtIndex(ELEMENTTYPE[] array, int index) { Assert.isTrue(array.length > 0, "Cannot remove an element from an already empty array."); ELEMENTTYPE[] result = java.util.Arrays.copyOf(array, array.length - 1); if (result.length > 0 && array.length + 1 != index ...
@Test public void testExceptionHierarchyFindsThrowable() throws Exception { Class<?>[] hierarchy = ProxyTypeInspector.getCompatibleClassHierarchy(getClass().getClassLoader(), MockException.class); Assert.assertEquals(2, hierarchy.length); Assert.assertEquals(Exception.class, hierarchy[0]); Assert.assertEquals(Serializa...
public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while (baseClass != null &&...
ProxyTypeInspector { public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while ...
ProxyTypeInspector { public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while ...
ProxyTypeInspector { public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while ...
ProxyTypeInspector { public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while ...
@Test public void testClassWithInstantiableBaseClass() throws Exception { Class<?>[] hierarchy = ProxyTypeInspector.getCompatibleClassHierarchy(getClass().getClassLoader(), MockExtendsImplementsExternal.class); Assert.assertEquals(MockBaseClassExternal.class, hierarchy[0]); Assert.assertEquals(MockInterface.class, hier...
public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while (baseClass != null &&...
ProxyTypeInspector { public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while ...
ProxyTypeInspector { public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while ...
ProxyTypeInspector { public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while ...
ProxyTypeInspector { public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while ...
@Test public void testInnerClassWithNonInstantiableBaseClass() throws Exception { Class<?>[] hierarchy = ProxyTypeInspector.getCompatibleClassHierarchy(getClass().getClassLoader(), MockExtendsImplementsInternal.class); Assert.assertEquals(MockInterface.class, hierarchy[0]); Assert.assertEquals(MockNestedInterface.class...
public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while (baseClass != null &&...
ProxyTypeInspector { public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while ...
ProxyTypeInspector { public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while ...
ProxyTypeInspector { public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while ...
ProxyTypeInspector { public static Class<?>[] getCompatibleClassHierarchy(ClassLoader loader, Class<?> origin) { Set<Class<?>> hierarchy = new LinkedHashSet<Class<?>>(); Class<?> baseClass = origin; while (baseClass != null && Modifier.isFinal(baseClass.getModifiers())) { baseClass = baseClass.getSuperclass(); } while ...
@Test public void testCreateTempDir() { File tmpDir = OperatingSystemUtils.createTempDir(); tmpDir.deleteOnExit(); Assert.assertThat(tmpDir.isDirectory(), is(true)); }
public static File createTempDir() throws IllegalStateException { File baseDir = getTempDirectory(); try { return Files.createTempDirectory(baseDir.toPath(), "tmpdir").toFile(); } catch (IOException e) { throw new IllegalStateException("Error while creating temporary directory", e); } }
OperatingSystemUtils { public static File createTempDir() throws IllegalStateException { File baseDir = getTempDirectory(); try { return Files.createTempDirectory(baseDir.toPath(), "tmpdir").toFile(); } catch (IOException e) { throw new IllegalStateException("Error while creating temporary directory", e); } } }
OperatingSystemUtils { public static File createTempDir() throws IllegalStateException { File baseDir = getTempDirectory(); try { return Files.createTempDirectory(baseDir.toPath(), "tmpdir").toFile(); } catch (IOException e) { throw new IllegalStateException("Error while creating temporary directory", e); } } }
OperatingSystemUtils { public static File createTempDir() throws IllegalStateException { File baseDir = getTempDirectory(); try { return Files.createTempDirectory(baseDir.toPath(), "tmpdir").toFile(); } catch (IOException e) { throw new IllegalStateException("Error while creating temporary directory", e); } } static S...
OperatingSystemUtils { public static File createTempDir() throws IllegalStateException { File baseDir = getTempDirectory(); try { return Files.createTempDirectory(baseDir.toPath(), "tmpdir").toFile(); } catch (IOException e) { throw new IllegalStateException("Error while creating temporary directory", e); } } static S...
@Test public void testParseVersionRange() throws Exception { VersionRange range = Versions.parseVersionRange("[0,15]"); Assert.assertEquals(SingleVersion.valueOf("0"), range.getMin()); Assert.assertEquals(SingleVersion.valueOf("15"), range.getMax()); Assert.assertTrue(range.isMinInclusive()); Assert.assertTrue(range.is...
public static VersionRange parseVersionRange(String range) throws VersionException { Assert.notNull(range, "Version range must not be null."); boolean lowerBoundInclusive = range.startsWith("["); boolean upperBoundInclusive = range.endsWith("]"); String process = range.substring(1, range.length() - 1).trim(); VersionRa...
Versions { public static VersionRange parseVersionRange(String range) throws VersionException { Assert.notNull(range, "Version range must not be null."); boolean lowerBoundInclusive = range.startsWith("["); boolean upperBoundInclusive = range.endsWith("]"); String process = range.substring(1, range.length() - 1).trim()...
Versions { public static VersionRange parseVersionRange(String range) throws VersionException { Assert.notNull(range, "Version range must not be null."); boolean lowerBoundInclusive = range.startsWith("["); boolean upperBoundInclusive = range.endsWith("]"); String process = range.substring(1, range.length() - 1).trim()...
Versions { public static VersionRange parseVersionRange(String range) throws VersionException { Assert.notNull(range, "Version range must not be null."); boolean lowerBoundInclusive = range.startsWith("["); boolean upperBoundInclusive = range.endsWith("]"); String process = range.substring(1, range.length() - 1).trim()...
Versions { public static VersionRange parseVersionRange(String range) throws VersionException { Assert.notNull(range, "Version range must not be null."); boolean lowerBoundInclusive = range.startsWith("["); boolean upperBoundInclusive = range.endsWith("]"); String process = range.substring(1, range.length() - 1).trim()...
@Test public void nextCameraState() { assertEquals(CameraState.BLOCKED, stateMachine.getCameraState()); stateMachine.nextCameraState(); assertEquals(CameraState.BLACK_PICTURE, stateMachine.getCameraState()); stateMachine.nextCameraState(); assertEquals(CameraState.NEUTRAL_PICTURE, stateMachine.getCameraState()); stateM...
public void nextCameraState() { switch (cameraState) { case BLOCKED: cameraState = CameraState.BLACK_PICTURE; jsonParser.setCameraState("softBlackPicture"); break; case BLACK_PICTURE: cameraState = CameraState.NEUTRAL_PICTURE; jsonParser.setCameraState("softNeutralPicture"); break; } }
StateMachine { public void nextCameraState() { switch (cameraState) { case BLOCKED: cameraState = CameraState.BLACK_PICTURE; jsonParser.setCameraState("softBlackPicture"); break; case BLACK_PICTURE: cameraState = CameraState.NEUTRAL_PICTURE; jsonParser.setCameraState("softNeutralPicture"); break; } } }
StateMachine { public void nextCameraState() { switch (cameraState) { case BLOCKED: cameraState = CameraState.BLACK_PICTURE; jsonParser.setCameraState("softBlackPicture"); break; case BLACK_PICTURE: cameraState = CameraState.NEUTRAL_PICTURE; jsonParser.setCameraState("softNeutralPicture"); break; } } StateMachine(); }
StateMachine { public void nextCameraState() { switch (cameraState) { case BLOCKED: cameraState = CameraState.BLACK_PICTURE; jsonParser.setCameraState("softBlackPicture"); break; case BLACK_PICTURE: cameraState = CameraState.NEUTRAL_PICTURE; jsonParser.setCameraState("softNeutralPicture"); break; } } StateMachine(); Mi...
StateMachine { public void nextCameraState() { switch (cameraState) { case BLOCKED: cameraState = CameraState.BLACK_PICTURE; jsonParser.setCameraState("softBlackPicture"); break; case BLACK_PICTURE: cameraState = CameraState.NEUTRAL_PICTURE; jsonParser.setCameraState("softNeutralPicture"); break; } } StateMachine(); Mi...
@Test public void nextMicrophoneState() { assertEquals(MicrophoneState.BLOCKED, stateMachine.getMicrophoneState()); stateMachine.nextMicrophoneState(); assertEquals(MicrophoneState.NO_SOUND, stateMachine.getMicrophoneState()); stateMachine.nextMicrophoneState(); assertEquals(MicrophoneState.NEUTRAL_SOUND, stateMachine....
public void nextMicrophoneState() { switch (getMicrophoneState()) { case BLOCKED: microphoneState = MicrophoneState.NO_SOUND; jsonParser.setMicrophoneState("softEmptyNoise"); break; case NO_SOUND: microphoneState = MicrophoneState.NEUTRAL_SOUND; jsonParser.setMicrophoneState("softSignalNoise"); break; } }
StateMachine { public void nextMicrophoneState() { switch (getMicrophoneState()) { case BLOCKED: microphoneState = MicrophoneState.NO_SOUND; jsonParser.setMicrophoneState("softEmptyNoise"); break; case NO_SOUND: microphoneState = MicrophoneState.NEUTRAL_SOUND; jsonParser.setMicrophoneState("softSignalNoise"); break; } ...
StateMachine { public void nextMicrophoneState() { switch (getMicrophoneState()) { case BLOCKED: microphoneState = MicrophoneState.NO_SOUND; jsonParser.setMicrophoneState("softEmptyNoise"); break; case NO_SOUND: microphoneState = MicrophoneState.NEUTRAL_SOUND; jsonParser.setMicrophoneState("softSignalNoise"); break; } ...
StateMachine { public void nextMicrophoneState() { switch (getMicrophoneState()) { case BLOCKED: microphoneState = MicrophoneState.NO_SOUND; jsonParser.setMicrophoneState("softEmptyNoise"); break; case NO_SOUND: microphoneState = MicrophoneState.NEUTRAL_SOUND; jsonParser.setMicrophoneState("softSignalNoise"); break; } ...
StateMachine { public void nextMicrophoneState() { switch (getMicrophoneState()) { case BLOCKED: microphoneState = MicrophoneState.NO_SOUND; jsonParser.setMicrophoneState("softEmptyNoise"); break; case NO_SOUND: microphoneState = MicrophoneState.NEUTRAL_SOUND; jsonParser.setMicrophoneState("softSignalNoise"); break; } ...
@Test public void testCleanDatabase() { assertThat(profileRepository.count()).isEqualTo(this.outdatedProfiles.length + this.upToDateProfiles.length); clearanceService.cleanDatabase(); assertThat(profileRepository.count()).isEqualTo(this.upToDateProfiles.length); Iterable<Profile> listUpToDateProfilesInDB = profileRepos...
public void cleanDatabase() { Calendar cal = GregorianCalendar.getInstance(Locale.GERMANY); cal.set(Calendar.DATE, cal.get(Calendar.DATE) - (30 * monthsBeforeDeletion)); System.out.println("************************************************"); System.out.println("\t Clearance-Prozess gestartet um " + GregorianCalendar.ge...
ClearanceService { public void cleanDatabase() { Calendar cal = GregorianCalendar.getInstance(Locale.GERMANY); cal.set(Calendar.DATE, cal.get(Calendar.DATE) - (30 * monthsBeforeDeletion)); System.out.println("************************************************"); System.out.println("\t Clearance-Prozess gestartet um " + G...
ClearanceService { public void cleanDatabase() { Calendar cal = GregorianCalendar.getInstance(Locale.GERMANY); cal.set(Calendar.DATE, cal.get(Calendar.DATE) - (30 * monthsBeforeDeletion)); System.out.println("************************************************"); System.out.println("\t Clearance-Prozess gestartet um " + G...
ClearanceService { public void cleanDatabase() { Calendar cal = GregorianCalendar.getInstance(Locale.GERMANY); cal.set(Calendar.DATE, cal.get(Calendar.DATE) - (30 * monthsBeforeDeletion)); System.out.println("************************************************"); System.out.println("\t Clearance-Prozess gestartet um " + G...
ClearanceService { public void cleanDatabase() { Calendar cal = GregorianCalendar.getInstance(Locale.GERMANY); cal.set(Calendar.DATE, cal.get(Calendar.DATE) - (30 * monthsBeforeDeletion)); System.out.println("************************************************"); System.out.println("\t Clearance-Prozess gestartet um " + G...
@Test public void noEqualsSign() throws Exception { assertThat(Cookie.parse("foo")).isNull(); assertThat(Cookie.parse("foo; Path=/")).isNull(); }
public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); }
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } }
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builde...
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builde...
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builde...
@Test public void builderExpiresAt() throws Exception { Cookie cookie = new Cookie.Builder() .name("a") .value("b") .hostOnlyDomain("example.com") .expiresAt(date("1970-01-01T00:00:01.000+0000").getTime()) .build(); assertThat(cookie.toString()).isEqualTo( "a=b; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/"); }
@Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(expiresAt)))...
Cookie { @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(exp...
Cookie { @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(exp...
Cookie { @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(exp...
Cookie { @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(exp...
@Test public void builderClampsMinDate() throws Exception { Cookie cookie = new Cookie.Builder() .name("a") .value("b") .hostOnlyDomain("example.com") .expiresAt(date("1970-01-01T00:00:00.000+0000").getTime()) .build(); assertThat(cookie.toString()).isEqualTo("a=b; max-age=0; path=/"); }
@Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(expiresAt)))...
Cookie { @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(exp...
Cookie { @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(exp...
Cookie { @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(exp...
Cookie { @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(exp...
@Test public void builderPath() throws Exception { Cookie cookie = new Cookie.Builder() .name("a") .value("b") .hostOnlyDomain("example.com") .path("/foo") .build(); assertThat(cookie.getPath()).isEqualTo("/foo"); }
public String getPath() { return path; }
Cookie { public String getPath() { return path; } }
Cookie { public String getPath() { return path; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); }
Cookie { public String getPath() { return path; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getPersisten...
Cookie { public String getPath() { return path; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getPersisten...
@Test public void builderSecure() throws Exception { Cookie cookie = new Cookie.Builder() .name("a") .value("b") .hostOnlyDomain("example.com") .secure(true) .build(); assertThat(cookie.getSecure()).isTrue(); }
public boolean getSecure() { return secure; }
Cookie { public boolean getSecure() { return secure; } }
Cookie { public boolean getSecure() { return secure; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); }
Cookie { public boolean getSecure() { return secure; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getPers...
Cookie { public boolean getSecure() { return secure; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getPers...
@Test public void builderHttpOnly() throws Exception { Cookie cookie = new Cookie.Builder() .name("a") .value("b") .hostOnlyDomain("example.com") .httpOnly(true) .build(); assertThat(cookie.getHttpOnly()).isTrue(); }
public boolean getHttpOnly() { return httpOnly; }
Cookie { public boolean getHttpOnly() { return httpOnly; } }
Cookie { public boolean getHttpOnly() { return httpOnly; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); }
Cookie { public boolean getHttpOnly() { return httpOnly; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean get...
Cookie { public boolean getHttpOnly() { return httpOnly; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean get...
@Test public void builderIpv6() throws Exception { Cookie cookie = new Cookie.Builder() .name("a") .value("b") .domain("0:0:0:0:0:0:0:1") .build(); assertThat(cookie.getDomain()).isEqualTo("0:0:0:0:0:0:0:1"); }
public String getDomain() { return domain; }
Cookie { public String getDomain() { return domain; } }
Cookie { public String getDomain() { return domain; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); }
Cookie { public String getDomain() { return domain; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getPersi...
Cookie { public String getDomain() { return domain; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getPersi...
@Test public void emptyName() throws Exception { assertThat(Cookie.parse("=b")).isNull(); assertThat(Cookie.parse(" =b")).isNull(); assertThat(Cookie.parse("\r\t \n=b")).isNull(); }
public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); }
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } }
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builde...
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builde...
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builde...
@Test public void invalidCharacters() throws Exception { assertThat(Cookie.parse("a\u0000b=cd")).isNull(); assertThat(Cookie.parse("ab=c\u0000d")).isNull(); assertThat(Cookie.parse("a\u0001b=cd")).isNull(); assertThat(Cookie.parse("ab=c\u0001d")).isNull(); assertThat(Cookie.parse("a\u0009b=cd")).isNull(); assertThat(Co...
public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); }
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } }
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builde...
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builde...
Cookie { public static Cookie parse(String setCookie) { return parse(System.currentTimeMillis(), setCookie); } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builde...
@Test public void maxAge() throws Exception { assertThat(parseCookie(50000L, "a=b; Max-Age=1").getExpiresAt()) .isEqualTo(51000L); assertThat(parseCookie(50000L, "a=b; Max-Age=9223372036854724").getExpiresAt()) .isEqualTo(MAX_DATE); assertThat(parseCookie(50000L, "a=b; Max-Age=9223372036854725").getExpiresAt()) .isEqua...
public long getExpiresAt() { return expiresAt; }
Cookie { public long getExpiresAt() { return expiresAt; } }
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); }
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getP...
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getP...
@Test public void maxAgeNonPositive() throws Exception { assertThat(parseCookie(50000L, "a=b; Max-Age=-1").getExpiresAt()) .isEqualTo(Long.MIN_VALUE); assertThat(parseCookie(50000L, "a=b; Max-Age=0").getExpiresAt()) .isEqualTo(Long.MIN_VALUE); assertThat(parseCookie(50000L, "a=b; Max-Age=-9223372036854775808").getExpir...
public long getExpiresAt() { return expiresAt; }
Cookie { public long getExpiresAt() { return expiresAt; } }
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); }
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getP...
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getP...
@Test public void maxAgeTakesPrecedenceOverExpires() throws Exception { assertThat(parseCookie( 0L, "a=b; Max-Age=1; Expires=Thu, 01 Jan 1970 00:00:02 GMT").getExpiresAt()).isEqualTo( 1000L); assertThat(parseCookie( 0L, "a=b; Expires=Thu, 01 Jan 1970 00:00:02 GMT; Max-Age=1").getExpiresAt()).isEqualTo( 1000L); assertTh...
public long getExpiresAt() { return expiresAt; }
Cookie { public long getExpiresAt() { return expiresAt; } }
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); }
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getP...
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getP...
@Test public void lastMaxAgeWins() throws Exception { assertThat(parseCookie( 0L, "a=b; Max-Age=2; Max-Age=4; Max-Age=1; Max-Age=3").getExpiresAt()).isEqualTo(3000L); }
public long getExpiresAt() { return expiresAt; }
Cookie { public long getExpiresAt() { return expiresAt; } }
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); }
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getP...
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getP...
@Test public void lastExpiresAtWins() throws Exception { assertThat(parseCookie(0L, "a=b; " + "Expires=Thu, 01 Jan 1970 00:00:02 GMT; " + "Expires=Thu, 01 Jan 1970 00:00:04 GMT; " + "Expires=Thu, 01 Jan 1970 00:00:01 GMT; " + "Expires=Thu, 01 Jan 1970 00:00:03 GMT").getExpiresAt()).isEqualTo(3000L); }
public long getExpiresAt() { return expiresAt; }
Cookie { public long getExpiresAt() { return expiresAt; } }
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); }
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getP...
Cookie { public long getExpiresAt() { return expiresAt; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean getP...
@Test public void maxAgeOrExpiresMakesCookiePersistent() throws Exception { assertThat(parseCookie(0L, "a=b").getPersistent()).isFalse(); assertThat(parseCookie(0L, "a=b; Max-Age=1").getPersistent()).isTrue(); assertThat(parseCookie(0L, "a=b; Expires=Thu, 01 Jan 1970 00:00:01 GMT").getPersistent()) .isTrue(); }
public boolean getPersistent() { return persistent; }
Cookie { public boolean getPersistent() { return persistent; } }
Cookie { public boolean getPersistent() { return persistent; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); }
Cookie { public boolean getPersistent() { return persistent; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean...
Cookie { public boolean getPersistent() { return persistent; } private Cookie(String name, String value, long expiresAt, String domain, String path, boolean secure, boolean httpOnly, boolean hostOnly, boolean persistent); private Cookie(Builder builder); String getName(); String getValue(); boolean...
@Test public void builderClampsMaxDate() throws Exception { Cookie cookie = new Cookie.Builder() .name("a") .value("b") .hostOnlyDomain("example.com") .expiresAt(Long.MAX_VALUE) .build(); assertThat(cookie.toString()).isEqualTo( "a=b; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/"); }
@Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(expiresAt)))...
Cookie { @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(exp...
Cookie { @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(exp...
Cookie { @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(exp...
Cookie { @Override public String toString() { StringBuilder result = new StringBuilder(); result.append(name); result.append('='); result.append(value); if (persistent) { if (expiresAt == Long.MIN_VALUE) { result.append("; max-age=0"); } else { result.append("; expires=").append(STANDARD_DATE_FORMAT.format(new Date(exp...
@Test public void getSegmentSplitByPolygon() throws Exception { Vector2D start = GeometryFactory.createVector(-5,0); Vector2D end = GeometryFactory.createVector(5,0); Segment2D segment = GeometryFactory.createSegment(start, end); ArrayList<Vector2D> nodeArray = new ArrayList<>(); nodeArray.add(GeometryFactory.createVec...
public ArrayList<Segment2D> getSegmentSplitByPolygon(Polygon2D polygon) { ArrayList<Segment2D> segmentList = new ArrayList<>(); ArrayList<Vector2D> segmentListPoints = new ArrayList<>(); segmentListPoints.add(this.getFirstPoint()); segmentListPoints.addAll(this.getIntersection(polygon)); segmentListPoints.add(this.getL...
Segment2D extends Geometry2D { public ArrayList<Segment2D> getSegmentSplitByPolygon(Polygon2D polygon) { ArrayList<Segment2D> segmentList = new ArrayList<>(); ArrayList<Vector2D> segmentListPoints = new ArrayList<>(); segmentListPoints.add(this.getFirstPoint()); segmentListPoints.addAll(this.getIntersection(polygon)); ...
Segment2D extends Geometry2D { public ArrayList<Segment2D> getSegmentSplitByPolygon(Polygon2D polygon) { ArrayList<Segment2D> segmentList = new ArrayList<>(); ArrayList<Vector2D> segmentListPoints = new ArrayList<>(); segmentListPoints.add(this.getFirstPoint()); segmentListPoints.addAll(this.getIntersection(polygon)); ...
Segment2D extends Geometry2D { public ArrayList<Segment2D> getSegmentSplitByPolygon(Polygon2D polygon) { ArrayList<Segment2D> segmentList = new ArrayList<>(); ArrayList<Vector2D> segmentListPoints = new ArrayList<>(); segmentListPoints.add(this.getFirstPoint()); segmentListPoints.addAll(this.getIntersection(polygon)); ...
Segment2D extends Geometry2D { public ArrayList<Segment2D> getSegmentSplitByPolygon(Polygon2D polygon) { ArrayList<Segment2D> segmentList = new ArrayList<>(); ArrayList<Vector2D> segmentListPoints = new ArrayList<>(); segmentListPoints.add(this.getFirstPoint()); segmentListPoints.addAll(this.getIntersection(polygon)); ...
@Test public void intersectionSegment() throws Exception { aStart = GeometryFactory.createVector(0,0); aDirection = GeometryFactory.createVector(1,0); a = GeometryFactory.createRay2D(aStart, aDirection); bStart = GeometryFactory.createVector(5,0); bDirection = GeometryFactory.createVector(-1,0); b = GeometryFactory.cre...
public Segment2D intersectionSegment(Ray2D other) { if(this.contains(other.getStart()) && other.contains(this.getStart())) { return new Segment2D(this.getStart(), other.getStart()); } else { return null; } }
Ray2D { public Segment2D intersectionSegment(Ray2D other) { if(this.contains(other.getStart()) && other.contains(this.getStart())) { return new Segment2D(this.getStart(), other.getStart()); } else { return null; } } }
Ray2D { public Segment2D intersectionSegment(Ray2D other) { if(this.contains(other.getStart()) && other.contains(this.getStart())) { return new Segment2D(this.getStart(), other.getStart()); } else { return null; } } Ray2D(Vector2D start, Vector2D direction); }
Ray2D { public Segment2D intersectionSegment(Ray2D other) { if(this.contains(other.getStart()) && other.contains(this.getStart())) { return new Segment2D(this.getStart(), other.getStart()); } else { return null; } } Ray2D(Vector2D start, Vector2D direction); Vector2D getStart(); void setStart(Vector2D start); Vector2D ...
Ray2D { public Segment2D intersectionSegment(Ray2D other) { if(this.contains(other.getStart()) && other.contains(this.getStart())) { return new Segment2D(this.getStart(), other.getStart()); } else { return null; } } Ray2D(Vector2D start, Vector2D direction); Vector2D getStart(); void setStart(Vector2D start); Vector2D ...
@Test @Parameters({"/layout_graph_test/FromGraphConfigurationOperation_insideArea_test.xml"}) public void fromConfiguration_loadsSingleVertexInsideArea_WithSuccess(String configurationFile) throws Exception { createConfiguration(configurationFile); SimulationState state = mock(SimulationState.class); graphOperation.cal...
@Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBooleanProperty(insideAreaSeedName); GraphScenarioConfigu...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
@Test @Parameters({"/layout_graph_test/FromGraphConfigurationOperation_insideArea_test.xml"}) public void fromConfiguration_loadsOnlySingleVertexInsideArea_WithSuccess(String configurationFile) throws Exception { createConfiguration(configurationFile); SimulationState state = mock(SimulationState.class); graphOperation...
@Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBooleanProperty(insideAreaSeedName); GraphScenarioConfigu...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
@Test @Parameters({"/layout_graph_test/FromGraphConfigurationOperation_insideArea_test.xml"}) public void fromConfiguration_ignoresVertexOutsideArea_WithSuccess(String configurationFile) throws Exception { createConfiguration(configurationFile); SimulationState state = mock(SimulationState.class); graphOperation.callPr...
@Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBooleanProperty(insideAreaSeedName); GraphScenarioConfigu...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
@Test @Parameters({"/layout_graph_test/FromGraphConfigurationOperation_insideArea_test.xml"}) public void fromConfiguration_loadsSingleVertexOnBorderOfArea_WithoutSuccess(String configurationFile) throws Exception { createConfiguration(configurationFile); createConfiguration(configurationFile); SimulationState state = ...
@Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBooleanProperty(insideAreaSeedName); GraphScenarioConfigu...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
@Test @Parameters({"/layout_graph_test/FromGraphConfigurationOperation_withPrecisionSeed_test.xml"}) public void fromConfiguration_loadsSingleVertexWithPrecision_WithSuccess(String configurationFile) throws Exception { createConfiguration(configurationFile); createConfiguration(configurationFile); SimulationState state...
@Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBooleanProperty(insideAreaSeedName); GraphScenarioConfigu...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
FromConfigurationOperation extends GraphOperation { @Override public void callPreProcessing(SimulationState simulationState) { Integer graphId = this.properties.getIntegerProperty(graphIdName); Double precisionSeed = this.properties.getDoubleProperty(precisionSeedName); Boolean insideAreaSeed = this.properties.getBoole...
@Test public void calculateTimeToConflictPoint() throws Exception { Vector2D curPosition, curVelocity, othPosition, othVelocity; curPosition = GeometryFactory.createVector(0, 0); curVelocity = GeometryFactory.createVector(0, 1); othPosition = GeometryFactory.createVector(2, 2); othVelocity = GeometryFactory.createVecto...
public static Double calculateTimeToConflictPoint(Vector2D currentPosition, Vector2D currentVelocity, Vector2D otherPosition, Vector2D otherVelocity) { if(currentVelocity.isZero() || otherVelocity.isZero()) { return Double.POSITIVE_INFINITY; } Ray2D currentRay = GeometryFactory.createRay2D(currentPosition, currentVeloc...
ZengAdditionalComputations { public static Double calculateTimeToConflictPoint(Vector2D currentPosition, Vector2D currentVelocity, Vector2D otherPosition, Vector2D otherVelocity) { if(currentVelocity.isZero() || otherVelocity.isZero()) { return Double.POSITIVE_INFINITY; } Ray2D currentRay = GeometryFactory.createRay2D(...
ZengAdditionalComputations { public static Double calculateTimeToConflictPoint(Vector2D currentPosition, Vector2D currentVelocity, Vector2D otherPosition, Vector2D otherVelocity) { if(currentVelocity.isZero() || otherVelocity.isZero()) { return Double.POSITIVE_INFINITY; } Ray2D currentRay = GeometryFactory.createRay2D(...
ZengAdditionalComputations { public static Double calculateTimeToConflictPoint(Vector2D currentPosition, Vector2D currentVelocity, Vector2D otherPosition, Vector2D otherVelocity) { if(currentVelocity.isZero() || otherVelocity.isZero()) { return Double.POSITIVE_INFINITY; } Ray2D currentRay = GeometryFactory.createRay2D(...
ZengAdditionalComputations { public static Double calculateTimeToConflictPoint(Vector2D currentPosition, Vector2D currentVelocity, Vector2D otherPosition, Vector2D otherVelocity) { if(currentVelocity.isZero() || otherVelocity.isZero()) { return Double.POSITIVE_INFINITY; } Ray2D currentRay = GeometryFactory.createRay2D(...
@Test public void isVisible() throws Exception { SightConePerceptionModel sightConePerceptionModelModel = new SightConePerceptionModel(); sightConePerceptionModelModel.setAngle(90); sightConePerceptionModelModel.setRadius(30); Vector2D curPedPos, curPedHead, otherPedPos, otherPedHead; curPedPos = GeometryFactory.create...
@Override public boolean isVisible(IPedestrian currentPedestrian, IPedestrian otherPedestrian) { return isVisible(currentPedestrian, otherPedestrian.getPosition()); }
SightConePerceptionModel extends PerceptionalModel { @Override public boolean isVisible(IPedestrian currentPedestrian, IPedestrian otherPedestrian) { return isVisible(currentPedestrian, otherPedestrian.getPosition()); } }
SightConePerceptionModel extends PerceptionalModel { @Override public boolean isVisible(IPedestrian currentPedestrian, IPedestrian otherPedestrian) { return isVisible(currentPedestrian, otherPedestrian.getPosition()); } }
SightConePerceptionModel extends PerceptionalModel { @Override public boolean isVisible(IPedestrian currentPedestrian, IPedestrian otherPedestrian) { return isVisible(currentPedestrian, otherPedestrian.getPosition()); } void setRadius(double radius); void setAngle(double angle); @Override void callPreProcessing(Simula...
SightConePerceptionModel extends PerceptionalModel { @Override public boolean isVisible(IPedestrian currentPedestrian, IPedestrian otherPedestrian) { return isVisible(currentPedestrian, otherPedestrian.getPosition()); } void setRadius(double radius); void setAngle(double angle); @Override void callPreProcessing(Simula...
@Test public void closestPoint() throws Exception { F1 = GeometryFactory.createVector(0, 0); F2 = GeometryFactory.createVector(2, 0); minorAxis = 2; ellipse = GeometryFactory.createEllipse(F1, F2, minorAxis); point = GeometryFactory.createVector(1, 3); closestPoint = ellipse.closestPoint(point); Assert.assertEquals(1, ...
public Vector2D closestPoint(Vector2D point) { return null; }
Ellipse2D { public Vector2D closestPoint(Vector2D point) { return null; } }
Ellipse2D { public Vector2D closestPoint(Vector2D point) { return null; } Ellipse2D(Vector2D center, Vector2D direction, double majorAxis, double minorAxis); }
Ellipse2D { public Vector2D closestPoint(Vector2D point) { return null; } Ellipse2D(Vector2D center, Vector2D direction, double majorAxis, double minorAxis); Vector2D closestPoint(Vector2D point); Vector2D vectorBetween(Vector2D point); Vector2D normal(Vector2D point); Vector2D getCenter(); void setCenter(Vector2D cent...
Ellipse2D { public Vector2D closestPoint(Vector2D point) { return null; } Ellipse2D(Vector2D center, Vector2D direction, double majorAxis, double minorAxis); Vector2D closestPoint(Vector2D point); Vector2D vectorBetween(Vector2D point); Vector2D normal(Vector2D point); Vector2D getCenter(); void setCenter(Vector2D cent...
@Test public void vectorBetween() throws Exception { Vector2D vectorBetween; F1 = GeometryFactory.createVector(0, 0); F2 = GeometryFactory.createVector(2, 0); minorAxis = 2; ellipse = GeometryFactory.createEllipse(F1, F2, minorAxis); point = GeometryFactory.createVector(1, 3); vectorBetween = ellipse.vectorBetween(poin...
public Vector2D vectorBetween(Vector2D point) { Vector2D closestPoint = closestPoint(point); return point.subtract(closestPoint); }
Ellipse2D { public Vector2D vectorBetween(Vector2D point) { Vector2D closestPoint = closestPoint(point); return point.subtract(closestPoint); } }
Ellipse2D { public Vector2D vectorBetween(Vector2D point) { Vector2D closestPoint = closestPoint(point); return point.subtract(closestPoint); } Ellipse2D(Vector2D center, Vector2D direction, double majorAxis, double minorAxis); }
Ellipse2D { public Vector2D vectorBetween(Vector2D point) { Vector2D closestPoint = closestPoint(point); return point.subtract(closestPoint); } Ellipse2D(Vector2D center, Vector2D direction, double majorAxis, double minorAxis); Vector2D closestPoint(Vector2D point); Vector2D vectorBetween(Vector2D point); Vector2D norm...
Ellipse2D { public Vector2D vectorBetween(Vector2D point) { Vector2D closestPoint = closestPoint(point); return point.subtract(closestPoint); } Ellipse2D(Vector2D center, Vector2D direction, double majorAxis, double minorAxis); Vector2D closestPoint(Vector2D point); Vector2D vectorBetween(Vector2D point); Vector2D norm...
@Test public void normal() throws Exception { center = GeometryFactory.createVector(1, 1); direction = GeometryFactory.createVector(1, 1); minorAxis = 2; majorAxis = 5; ellipse = GeometryFactory.createEllipse(center, direction, majorAxis, minorAxis); point = GeometryFactory.createVector(1-1/Math.sqrt(2), 1+1/Math.sqrt(...
public Vector2D normal(Vector2D point) { Vector2D pointOnEllipse = closestPoint(point); pointOnEllipse = pointOnEllipse.subtract(this.getCenter()).rotate(-this.getOrientation()); Vector2D normal = new Vector2D(pointOnEllipse.getXComponent() * getMinorAxis()/getMajorAxis(), pointOnEllipse.getYComponent() * getMajorAxis(...
Ellipse2D { public Vector2D normal(Vector2D point) { Vector2D pointOnEllipse = closestPoint(point); pointOnEllipse = pointOnEllipse.subtract(this.getCenter()).rotate(-this.getOrientation()); Vector2D normal = new Vector2D(pointOnEllipse.getXComponent() * getMinorAxis()/getMajorAxis(), pointOnEllipse.getYComponent() * g...
Ellipse2D { public Vector2D normal(Vector2D point) { Vector2D pointOnEllipse = closestPoint(point); pointOnEllipse = pointOnEllipse.subtract(this.getCenter()).rotate(-this.getOrientation()); Vector2D normal = new Vector2D(pointOnEllipse.getXComponent() * getMinorAxis()/getMajorAxis(), pointOnEllipse.getYComponent() * g...
Ellipse2D { public Vector2D normal(Vector2D point) { Vector2D pointOnEllipse = closestPoint(point); pointOnEllipse = pointOnEllipse.subtract(this.getCenter()).rotate(-this.getOrientation()); Vector2D normal = new Vector2D(pointOnEllipse.getXComponent() * getMinorAxis()/getMajorAxis(), pointOnEllipse.getYComponent() * g...
Ellipse2D { public Vector2D normal(Vector2D point) { Vector2D pointOnEllipse = closestPoint(point); pointOnEllipse = pointOnEllipse.subtract(this.getCenter()).rotate(-this.getOrientation()); Vector2D normal = new Vector2D(pointOnEllipse.getXComponent() * getMinorAxis()/getMajorAxis(), pointOnEllipse.getYComponent() * g...
@Test public void vectorBetween() throws Exception { center = GeometryFactory.createVector(0, 0); direction = GeometryFactory.createVector(1, 0); width = 2; height = 6; rectangle = new Rectangle2D(center, direction, width, height); point = GeometryFactory.createVector(3, 2); Assert.assertEquals(1, rectangle.distanceBet...
@Override public Vector2D vectorBetween(Vector2D point) { return this.rectangleAsSegments().vectorBetween(point); }
Rectangle2D extends Geometry2D { @Override public Vector2D vectorBetween(Vector2D point) { return this.rectangleAsSegments().vectorBetween(point); } }
Rectangle2D extends Geometry2D { @Override public Vector2D vectorBetween(Vector2D point) { return this.rectangleAsSegments().vectorBetween(point); } Rectangle2D(Vector2D center, Vector2D direction, double width, double height); }
Rectangle2D extends Geometry2D { @Override public Vector2D vectorBetween(Vector2D point) { return this.rectangleAsSegments().vectorBetween(point); } Rectangle2D(Vector2D center, Vector2D direction, double width, double height); @Override double distanceBetween(Vector2D point); @Override double minimalDistanceBetween(Li...
Rectangle2D extends Geometry2D { @Override public Vector2D vectorBetween(Vector2D point) { return this.rectangleAsSegments().vectorBetween(point); } Rectangle2D(Vector2D center, Vector2D direction, double width, double height); @Override double distanceBetween(Vector2D point); @Override double minimalDistanceBetween(Li...
@Test public void intersectionPoint() throws Exception { aStart = GeometryFactory.createVector(0,0); aDirection = GeometryFactory.createVector(1,0); a = GeometryFactory.createRay2D(aStart, aDirection); bStart = GeometryFactory.createVector(0,1); bDirection = GeometryFactory.createVector(1,0); b = GeometryFactory.create...
public Vector2D intersectionPoint(Ray2D other) { double dx = other.getStart().getXComponent() - this.getStart().getXComponent(); double dy = other.getStart().getYComponent() - this.getStart().getYComponent(); double det = other.getDirection().getXComponent() * this.getDirection().getYComponent() - other.getDirection()....
Ray2D { public Vector2D intersectionPoint(Ray2D other) { double dx = other.getStart().getXComponent() - this.getStart().getXComponent(); double dy = other.getStart().getYComponent() - this.getStart().getYComponent(); double det = other.getDirection().getXComponent() * this.getDirection().getYComponent() - other.getDire...
Ray2D { public Vector2D intersectionPoint(Ray2D other) { double dx = other.getStart().getXComponent() - this.getStart().getXComponent(); double dy = other.getStart().getYComponent() - this.getStart().getYComponent(); double det = other.getDirection().getXComponent() * this.getDirection().getYComponent() - other.getDire...
Ray2D { public Vector2D intersectionPoint(Ray2D other) { double dx = other.getStart().getXComponent() - this.getStart().getXComponent(); double dy = other.getStart().getYComponent() - this.getStart().getYComponent(); double det = other.getDirection().getXComponent() * this.getDirection().getYComponent() - other.getDire...
Ray2D { public Vector2D intersectionPoint(Ray2D other) { double dx = other.getStart().getXComponent() - this.getStart().getXComponent(); double dy = other.getStart().getYComponent() - this.getStart().getYComponent(); double det = other.getDirection().getXComponent() * this.getDirection().getYComponent() - other.getDire...
@Test public void isParallel() throws Exception { aStart = GeometryFactory.createVector(0,0); aDirection = GeometryFactory.createVector(1,0); a = GeometryFactory.createRay2D(aStart, aDirection); bStart = GeometryFactory.createVector(1,1); bDirection = GeometryFactory.createVector(1,0); b = GeometryFactory.createRay2D(b...
public boolean isParallel(Ray2D other) { return this.getDirection().cross(other.getDirection()) == 0; }
Ray2D { public boolean isParallel(Ray2D other) { return this.getDirection().cross(other.getDirection()) == 0; } }
Ray2D { public boolean isParallel(Ray2D other) { return this.getDirection().cross(other.getDirection()) == 0; } Ray2D(Vector2D start, Vector2D direction); }
Ray2D { public boolean isParallel(Ray2D other) { return this.getDirection().cross(other.getDirection()) == 0; } Ray2D(Vector2D start, Vector2D direction); Vector2D getStart(); void setStart(Vector2D start); Vector2D getDirection(); void setDirection(Vector2D direction); Vector2D intersectionPoint(Ray2D other); Ray2D in...
Ray2D { public boolean isParallel(Ray2D other) { return this.getDirection().cross(other.getDirection()) == 0; } Ray2D(Vector2D start, Vector2D direction); Vector2D getStart(); void setStart(Vector2D start); Vector2D getDirection(); void setDirection(Vector2D direction); Vector2D intersectionPoint(Ray2D other); Ray2D in...
@Test public void equals() throws Exception { aStart = GeometryFactory.createVector(0,0); aDirection = GeometryFactory.createVector(1,0); a = GeometryFactory.createRay2D(aStart, aDirection); bStart = GeometryFactory.createVector(1,1); bDirection = GeometryFactory.createVector(1,0); b = GeometryFactory.createRay2D(bStar...
public boolean equals(Ray2D other) { return this.getStart().equals(other.getStart()) && this.getDirection().getNormalized().equals(other.getDirection().getNormalized()); }
Ray2D { public boolean equals(Ray2D other) { return this.getStart().equals(other.getStart()) && this.getDirection().getNormalized().equals(other.getDirection().getNormalized()); } }
Ray2D { public boolean equals(Ray2D other) { return this.getStart().equals(other.getStart()) && this.getDirection().getNormalized().equals(other.getDirection().getNormalized()); } Ray2D(Vector2D start, Vector2D direction); }
Ray2D { public boolean equals(Ray2D other) { return this.getStart().equals(other.getStart()) && this.getDirection().getNormalized().equals(other.getDirection().getNormalized()); } Ray2D(Vector2D start, Vector2D direction); Vector2D getStart(); void setStart(Vector2D start); Vector2D getDirection(); void setDirection(Ve...
Ray2D { public boolean equals(Ray2D other) { return this.getStart().equals(other.getStart()) && this.getDirection().getNormalized().equals(other.getDirection().getNormalized()); } Ray2D(Vector2D start, Vector2D direction); Vector2D getStart(); void setStart(Vector2D start); Vector2D getDirection(); void setDirection(Ve...
@Test public void contains() throws Exception { aStart = GeometryFactory.createVector(5,5); aDirection = GeometryFactory.createVector(1,0); a = GeometryFactory.createRay2D(aStart, aDirection); point = GeometryFactory.createVector(7,0); assertFalse(a.contains(point)); point = GeometryFactory.createVector(7,5); assertTru...
public boolean contains(Vector2D point) { Vector2D newNorm = point.subtract(this.getStart()).getNormalized(); double dotProduct = newNorm.dot(this.getDirection().getNormalized()); return Math.abs(1.0 - dotProduct) < EPSILON; }
Ray2D { public boolean contains(Vector2D point) { Vector2D newNorm = point.subtract(this.getStart()).getNormalized(); double dotProduct = newNorm.dot(this.getDirection().getNormalized()); return Math.abs(1.0 - dotProduct) < EPSILON; } }
Ray2D { public boolean contains(Vector2D point) { Vector2D newNorm = point.subtract(this.getStart()).getNormalized(); double dotProduct = newNorm.dot(this.getDirection().getNormalized()); return Math.abs(1.0 - dotProduct) < EPSILON; } Ray2D(Vector2D start, Vector2D direction); }
Ray2D { public boolean contains(Vector2D point) { Vector2D newNorm = point.subtract(this.getStart()).getNormalized(); double dotProduct = newNorm.dot(this.getDirection().getNormalized()); return Math.abs(1.0 - dotProduct) < EPSILON; } Ray2D(Vector2D start, Vector2D direction); Vector2D getStart(); void setStart(Vector2...
Ray2D { public boolean contains(Vector2D point) { Vector2D newNorm = point.subtract(this.getStart()).getNormalized(); double dotProduct = newNorm.dot(this.getDirection().getNormalized()); return Math.abs(1.0 - dotProduct) < EPSILON; } Ray2D(Vector2D start, Vector2D direction); Vector2D getStart(); void setStart(Vector2...
@Test public void intersectionRay() throws Exception { aStart = GeometryFactory.createVector(0,0); aDirection = GeometryFactory.createVector(1,0); a = GeometryFactory.createRay2D(aStart, aDirection); bStart = GeometryFactory.createVector(5,0); bDirection = GeometryFactory.createVector(1,0); b = GeometryFactory.createRa...
public Ray2D intersectionRay(Ray2D other) { double dotProduct = this.getDirection().getNormalized().dot(other.getDirection().getNormalized()); if(this.contains(other.getStart()) && !other.contains(this.getStart()) && Math.abs(1.0 - dotProduct) < EPSILON) { return new Ray2D(other.getStart(), other.getDirection()); } els...
Ray2D { public Ray2D intersectionRay(Ray2D other) { double dotProduct = this.getDirection().getNormalized().dot(other.getDirection().getNormalized()); if(this.contains(other.getStart()) && !other.contains(this.getStart()) && Math.abs(1.0 - dotProduct) < EPSILON) { return new Ray2D(other.getStart(), other.getDirection()...
Ray2D { public Ray2D intersectionRay(Ray2D other) { double dotProduct = this.getDirection().getNormalized().dot(other.getDirection().getNormalized()); if(this.contains(other.getStart()) && !other.contains(this.getStart()) && Math.abs(1.0 - dotProduct) < EPSILON) { return new Ray2D(other.getStart(), other.getDirection()...
Ray2D { public Ray2D intersectionRay(Ray2D other) { double dotProduct = this.getDirection().getNormalized().dot(other.getDirection().getNormalized()); if(this.contains(other.getStart()) && !other.contains(this.getStart()) && Math.abs(1.0 - dotProduct) < EPSILON) { return new Ray2D(other.getStart(), other.getDirection()...
Ray2D { public Ray2D intersectionRay(Ray2D other) { double dotProduct = this.getDirection().getNormalized().dot(other.getDirection().getNormalized()); if(this.contains(other.getStart()) && !other.contains(this.getStart()) && Math.abs(1.0 - dotProduct) < EPSILON) { return new Ray2D(other.getStart(), other.getDirection()...
@Test public void pluginRegistersATask() { Project project = ProjectBuilder.builder().build(); project.getPlugins().apply("org.openapitools.openapistylevalidator"); assertNotNull(project.getTasks().findByName("openAPIStyleValidator")); }
public void apply(Project project) { project.getTasks().register("openAPIStyleValidator", OpenAPIStyleValidatorTask.class); }
OpenAPIStyleValidatorGradlePlugin implements Plugin<Project> { public void apply(Project project) { project.getTasks().register("openAPIStyleValidator", OpenAPIStyleValidatorTask.class); } }
OpenAPIStyleValidatorGradlePlugin implements Plugin<Project> { public void apply(Project project) { project.getTasks().register("openAPIStyleValidator", OpenAPIStyleValidatorTask.class); } }
OpenAPIStyleValidatorGradlePlugin implements Plugin<Project> { public void apply(Project project) { project.getTasks().register("openAPIStyleValidator", OpenAPIStyleValidatorTask.class); } void apply(Project project); }
OpenAPIStyleValidatorGradlePlugin implements Plugin<Project> { public void apply(Project project) { project.getTasks().register("openAPIStyleValidator", OpenAPIStyleValidatorTask.class); } void apply(Project project); }
@Test void validateShouldReturnSixErrorsWithoutOptionFile() throws Exception { OptionManager optionManager = new OptionManager(); Options options = optionManager.getOptions(); CommandLine commandLine = parser.parse(options, new String[]{"-s", "src/test/resources/ping.yaml"}); List<StyleError> errorList = Main.validate(...
static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLine), nu...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
@Test void validateShouldReturnSixErrorsWithEmptyOptionFile() throws Exception { OptionManager optionManager = new OptionManager(); Options options = optionManager.getOptions(); CommandLine commandLine = parser.parse(options, new String[]{"-s", "src/test/resources/ping.yaml", "-o", "src/test/resources/empty.json"}); Li...
static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLine), nu...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
@Test void validateShouldReturnSixErrorsWithDefaultOptionFile() throws Exception { OptionManager optionManager = new OptionManager(); Options options = optionManager.getOptions(); CommandLine commandLine = parser.parse(options, new String[]{"-s", "src/test/resources/ping.yaml", "-o", "src/test/resources/default.json"})...
static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLine), nu...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
@Test void validateShouldReturnNoErrorsWithCustomOptionFile() throws Exception { OptionManager optionManager = new OptionManager(); Options options = optionManager.getOptions(); CommandLine commandLine = parser.parse(options, new String[]{"-s", "src/test/resources/ping.yaml", "-o", "src/test/resources/custom.json"}); L...
static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLine), nu...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
@Test void validateWithoutOptionFileShouldReturnNamingErrors() throws Exception { OptionManager optionManager = new OptionManager(); Options options = optionManager.getOptions(); CommandLine commandLine = parser.parse(options, new String[]{"-s", "src/test/resources/some.yaml"}); List<StyleError> errorList = Main.valida...
static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLine), nu...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
@Test void validateWithAlternativeNamingOptionTestShouldReturnNamingErrors() throws Exception { OptionManager optionManager = new OptionManager(); Options options = optionManager.getOptions(); CommandLine commandLine = parser.parse(options, new String[]{"-s", "src/test/resources/some.yaml", "-o", "src/test/resources/al...
static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLine), nu...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
@Test void validateWithUnderscoreNamingOptionTestShouldReturnNoError() throws Exception { OptionManager optionManager = new OptionManager(); Options options = optionManager.getOptions(); CommandLine commandLine = parser.parse(options, new String[]{"-s", "src/test/resources/some.yaml", "-o", "src/test/resources/undersco...
static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLine), nu...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
@Test void validateWithAlternativeLegacyNamingOptionTestShouldReturnNamingErrors() throws Exception { OptionManager optionManager = new OptionManager(); Options options = optionManager.getOptions(); CommandLine commandLine = parser.parse(options, new String[]{"-s", "src/test/resources/some.yaml", "-o", "src/test/resour...
static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLine), nu...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
@Test void validateWithAlternativeAndLegacyNamingOptionTestShouldReturnNamingErrors() throws Exception { OptionManager optionManager = new OptionManager(); Options options = optionManager.getOptions(); CommandLine commandLine = parser.parse(options, new String[]{"-s", "src/test/resources/some.yaml", "-o", "src/test/res...
static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLine), nu...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
@Test void validateWithUnderscoreLegacyNamingOptionTestShouldReturnNoError() throws Exception { OptionManager optionManager = new OptionManager(); Options options = optionManager.getOptions(); CommandLine commandLine = parser.parse(options, new String[]{"-s", "src/test/resources/some.yaml", "-o", "src/test/resources/un...
static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLine), nu...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
Main { static List<StyleError> validate(OptionManager optionManager, CommandLine commandLine) { OpenAPIParser openApiParser = new OpenAPIParser(); ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); SwaggerParseResult parserResult = openApiParser.readLocation(optionManager.getSource(commandLi...
@Test void goodUnderscoreCaseShouldReturnTrue() { String goodUnderscoreCase1 = "my_variable"; String goodUnderscoreCase2 = "variable"; String goodUnderscoreCase3 = "my_super_variable"; boolean actual1 = validator.isNamingValid(goodUnderscoreCase1, ValidatorParameters.NamingConvention.UnderscoreCase); boolean actual2 = ...
boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
@Test void badUnderscoreCaseShouldReturnFalse() { String badUnderscoreCase1 = "myVariable"; String badUnderscoreCase2 = "my-variable"; String badUnderscoreCase3 = "my-Variable"; String badUnderscoreCase4 = "my__variable_lol"; String badUnderscoreCase5 = "_my_variable"; String badUnderscoreCase6 = "my_variable_"; boolea...
boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
@Test void goodCamelCaseShouldReturnTrue() { String goodCamelCase1 = "myVariable"; String goodCamelCase2 = "variable"; String goodCamelCase3 = "mySuperVariable"; String goodCamelCase4 = "mySuperVariableIsAFunnyOne"; String goodCamelCase5 = "zone2Delete"; String goodCamelCase6 = "address1"; boolean actual1 = validator.i...
boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
@Test void badCamelCaseShouldReturnFalse() { String badCamelCase1 = "my_variable"; String badCamelCase2 = "my-variable"; String badCamelCase3 = "my-Variable"; String badCamelCase4 = "Variable"; String badCamelCase5 = "my variable"; boolean actual1 = validator.isNamingValid(badCamelCase1, ValidatorParameters.NamingConve...
boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
@Test void goodHyphenCaseShouldReturnTrue() { String goodHyphenCase1 = "my-variable"; String goodHyphenCase2 = "variable"; String goodHyphenCase3 = "my-super-variable"; boolean actual1 = validator.isNamingValid(goodHyphenCase1, ValidatorParameters.NamingConvention.HyphenCase); boolean actual2 = validator.isNamingValid(...
boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
@Test void badHyphenCaseShouldReturnFalse() { String badHyphenCase1 = "my_variable"; String badHyphenCase2 = "myVariable"; String badHyphenCase3 = "my_Variable"; String badHyphenCase4 = "my__Variable_is_important"; String badHyphenCase5 = "_my_variable"; String badHyphenCase6 = "my_variable_"; boolean actual1 = validat...
boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
NamingValidator { boolean isNamingValid(String name, ValidatorParameters.NamingConvention namingStrategy) { switch (namingStrategy) { case UnderscoreCase: return isUnderscoreCase(name); case CamelCase: return isCamelCase(name); case HyphenCase: return isHyphenCase(name); } return false; } }
@Test void validatePingOpenAPI() { OpenAPI openAPI = createPingOpenAPI(); OpenApiSpecStyleValidator validator = new OpenApiSpecStyleValidator(openAPI); ValidatorParameters parameters = new ValidatorParameters(); List<StyleError> errors = validator.validate(parameters); assertTrue(errors.size() == 1); assertEquals("*ERR...
public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); }
OpenApiSpecStyleValidator { public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); } }
OpenApiSpecStyleValidator { public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); } OpenApiSpecStyleValidator(OpenAPI openApi); }
OpenApiSpecStyleValidator { public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); } OpenApiSpecStyleValidator(OpenAPI openApi); List<StyleError> validate(ValidatorP...
OpenApiSpecStyleValidator { public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); } OpenApiSpecStyleValidator(OpenAPI openApi); List<StyleError> validate(ValidatorP...
@Test void validatePingOpenAPI_without_ValidateModelPropertiesExample() { OpenAPI openAPI = createPingOpenAPI(); OpenApiSpecStyleValidator validator = new OpenApiSpecStyleValidator(openAPI); ValidatorParameters parameters = new ValidatorParameters(); parameters.setValidateModelPropertiesExample(false); List<StyleError>...
public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); }
OpenApiSpecStyleValidator { public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); } }
OpenApiSpecStyleValidator { public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); } OpenApiSpecStyleValidator(OpenAPI openApi); }
OpenApiSpecStyleValidator { public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); } OpenApiSpecStyleValidator(OpenAPI openApi); List<StyleError> validate(ValidatorP...
OpenApiSpecStyleValidator { public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); } OpenApiSpecStyleValidator(OpenAPI openApi); List<StyleError> validate(ValidatorP...
@Test void validatePingOpenAPI_WithoutSchema_and_components() { OpenAPI openAPI = createSimplePingOpenAPI(); OpenApiSpecStyleValidator validator = new OpenApiSpecStyleValidator(openAPI); ValidatorParameters parameters = new ValidatorParameters(); List<StyleError> errors = validator.validate(parameters); assertTrue(erro...
public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); }
OpenApiSpecStyleValidator { public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); } }
OpenApiSpecStyleValidator { public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); } OpenApiSpecStyleValidator(OpenAPI openApi); }
OpenApiSpecStyleValidator { public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); } OpenApiSpecStyleValidator(OpenAPI openApi); List<StyleError> validate(ValidatorP...
OpenApiSpecStyleValidator { public List<StyleError> validate(ValidatorParameters parameters) { this.parameters = parameters; validateInfo(); validateOperations(); validateModels(); validateNaming(); return errorAggregator.getErrorList(); } OpenApiSpecStyleValidator(OpenAPI openApi); List<StyleError> validate(ValidatorP...
@Test public void testSubstituteProperties() { Map<String, String> properties = new HashMap<>(); properties.put("name", "Bruce Wayne"); properties.put("description", "Batman"); properties.put("Snippet", "I am the night"); KmlPlacemark placemark = new KmlPlacemark(null, null, null, properties); String result1 = KmlUtil....
public static String substituteProperties(String template, KmlPlacemark placemark) { StringBuffer sb = new StringBuffer(); Pattern pattern = Pattern.compile("\\$\\[(.+?)]"); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String property = matcher.group(1); String value = placemark.getProperty(pro...
KmlUtil { public static String substituteProperties(String template, KmlPlacemark placemark) { StringBuffer sb = new StringBuffer(); Pattern pattern = Pattern.compile("\\$\\[(.+?)]"); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String property = matcher.group(1); String value = placemark.getPr...
KmlUtil { public static String substituteProperties(String template, KmlPlacemark placemark) { StringBuffer sb = new StringBuffer(); Pattern pattern = Pattern.compile("\\$\\[(.+?)]"); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String property = matcher.group(1); String value = placemark.getPr...
KmlUtil { public static String substituteProperties(String template, KmlPlacemark placemark) { StringBuffer sb = new StringBuffer(); Pattern pattern = Pattern.compile("\\$\\[(.+?)]"); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String property = matcher.group(1); String value = placemark.getPr...
KmlUtil { public static String substituteProperties(String template, KmlPlacemark placemark) { StringBuffer sb = new StringBuffer(); Pattern pattern = Pattern.compile("\\$\\[(.+?)]"); Matcher matcher = pattern.matcher(template); while (matcher.find()) { String property = matcher.group(1); String value = placemark.getPr...
@Test public void testCreateContainerProperty() throws Exception { XmlPullParser xmlPullParser = createParser("amu_basic_folder.kml"); KmlContainer kmlContainer = KmlContainerParser.createContainer(xmlPullParser); assertTrue(kmlContainer.hasProperties()); assertEquals("Basic Folder", kmlContainer.getProperty("name")); ...
static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
@Test public void testCreateContainerPlacemark() throws Exception { XmlPullParser xmlPullParser = createParser("amu_basic_folder.kml"); KmlContainer kmlContainer = KmlContainerParser.createContainer(xmlPullParser); assertTrue(kmlContainer.hasPlacemarks()); assertEquals(1, kmlContainer.getPlacemarksHashMap().size()); xm...
static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
@Test public void testCreateContainerGroundOverlay() throws Exception { XmlPullParser xmlPullParser = createParser("amu_ground_overlay.kml"); KmlContainer kmlContainer = KmlContainerParser.createContainer(xmlPullParser); assertEquals(2, kmlContainer.getGroundOverlayHashMap().size()); }
static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
@Test public void testCreateContainerObjects() throws Exception { XmlPullParser xmlPullParser = createParser("amu_nested_folders.kml"); KmlContainer kmlContainer = KmlContainerParser.createContainer(xmlPullParser); assertNotNull(kmlContainer.getContainers()); int numberOfNestedContainers = 0; for (KmlContainer containe...
static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
KmlContainerParser { static KmlContainer createContainer(XmlPullParser parser) throws XmlPullParserException, IOException { return assignPropertiesToContainer(parser); } }
@Test public void testGetKmlGeometryObject() { KmlLineString kmlLineString = createSimpleLineString(); assertNotNull(kmlLineString); assertNotNull(kmlLineString.getGeometryObject()); assertEquals(3, kmlLineString.getGeometryObject().size()); assertEquals(0.0, kmlLineString.getGeometryObject().get(0).latitude, 0); asser...
public ArrayList<LatLng> getGeometryObject() { List<LatLng> coordinatesList = super.getGeometryObject(); return new ArrayList<>(coordinatesList); }
KmlLineString extends LineString { public ArrayList<LatLng> getGeometryObject() { List<LatLng> coordinatesList = super.getGeometryObject(); return new ArrayList<>(coordinatesList); } }
KmlLineString extends LineString { public ArrayList<LatLng> getGeometryObject() { List<LatLng> coordinatesList = super.getGeometryObject(); return new ArrayList<>(coordinatesList); } KmlLineString(ArrayList<LatLng> coordinates); KmlLineString(ArrayList<LatLng> coordinates, ArrayList<Double> altitudes); }
KmlLineString extends LineString { public ArrayList<LatLng> getGeometryObject() { List<LatLng> coordinatesList = super.getGeometryObject(); return new ArrayList<>(coordinatesList); } KmlLineString(ArrayList<LatLng> coordinates); KmlLineString(ArrayList<LatLng> coordinates, ArrayList<Double> altitudes); ArrayList<Doubl...
KmlLineString extends LineString { public ArrayList<LatLng> getGeometryObject() { List<LatLng> coordinatesList = super.getGeometryObject(); return new ArrayList<>(coordinatesList); } KmlLineString(ArrayList<LatLng> coordinates); KmlLineString(ArrayList<LatLng> coordinates, ArrayList<Double> altitudes); ArrayList<Doubl...
@Test public void testLineStringAltitudes() { KmlLineString kmlLineString = createSimpleLineString(); assertNotNull(kmlLineString); assertNull(kmlLineString.getAltitudes()); kmlLineString = createSimpleLineStringWithAltitudes(); assertNotNull(kmlLineString); assertNotNull(kmlLineString.getAltitudes()); assertEquals(100...
public ArrayList<Double> getAltitudes() { return mAltitudes; }
KmlLineString extends LineString { public ArrayList<Double> getAltitudes() { return mAltitudes; } }
KmlLineString extends LineString { public ArrayList<Double> getAltitudes() { return mAltitudes; } KmlLineString(ArrayList<LatLng> coordinates); KmlLineString(ArrayList<LatLng> coordinates, ArrayList<Double> altitudes); }
KmlLineString extends LineString { public ArrayList<Double> getAltitudes() { return mAltitudes; } KmlLineString(ArrayList<LatLng> coordinates); KmlLineString(ArrayList<LatLng> coordinates, ArrayList<Double> altitudes); ArrayList<Double> getAltitudes(); ArrayList<LatLng> getGeometryObject(); }
KmlLineString extends LineString { public ArrayList<Double> getAltitudes() { return mAltitudes; } KmlLineString(ArrayList<LatLng> coordinates); KmlLineString(ArrayList<LatLng> coordinates, ArrayList<Double> altitudes); ArrayList<Double> getAltitudes(); ArrayList<LatLng> getGeometryObject(); }
@Test public void testPolygon() throws Exception { XmlPullParser xmlPullParser = createParser("amu_basic_placemark.kml"); KmlPlacemark placemark = KmlFeatureParser.createPlacemark(xmlPullParser); assertNotNull(placemark); assertEquals(placemark.getGeometry().getGeometryType(), "Polygon"); KmlPolygon polygon = ((KmlPoly...
static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(eventType == END_TAG &&...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
@Test public void testMultiGeometry() throws Exception { XmlPullParser xmlPullParser = createParser("amu_multigeometry_placemarks.kml"); KmlPlacemark placemark = KmlFeatureParser.createPlacemark(xmlPullParser); assertNotNull(placemark); assertEquals(placemark.getGeometry().getGeometryType(), "MultiGeometry"); KmlMultiG...
static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(eventType == END_TAG &&...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
@Test public void testProperties() throws Exception { XmlPullParser xmlPullParser = createParser("amu_multigeometry_placemarks.kml"); KmlPlacemark placemark = KmlFeatureParser.createPlacemark(xmlPullParser); assertTrue(placemark.hasProperties()); assertEquals(placemark.getProperty("name"), "Placemark Test"); assertNull...
static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(eventType == END_TAG &&...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
@Test public void testExtendedData() throws Exception { XmlPullParser xmlPullParser = createParser("amu_multiple_placemarks.kml"); KmlPlacemark placemark = KmlFeatureParser.createPlacemark(xmlPullParser); assertNotNull(placemark.getProperty("holeNumber")); }
static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(eventType == END_TAG &&...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
@Test public void testTimestamps() { KmlTrack kmlTrack = createSimpleTrack(); assertNotNull(kmlTrack); assertNotNull(kmlTrack.getTimestamps()); assertEquals(kmlTrack.getTimestamps().size(), 3); assertEquals(kmlTrack.getTimestamps().get(0), Long.valueOf(1000L)); assertEquals(kmlTrack.getTimestamps().get(1), Long.valueOf...
public ArrayList<Long> getTimestamps() { return mTimestamps; }
KmlTrack extends KmlLineString { public ArrayList<Long> getTimestamps() { return mTimestamps; } }
KmlTrack extends KmlLineString { public ArrayList<Long> getTimestamps() { return mTimestamps; } KmlTrack(ArrayList<LatLng> coordinates, ArrayList<Double> altitudes, ArrayList<Long> timestamps, HashMap<String, String> properties); }
KmlTrack extends KmlLineString { public ArrayList<Long> getTimestamps() { return mTimestamps; } KmlTrack(ArrayList<LatLng> coordinates, ArrayList<Double> altitudes, ArrayList<Long> timestamps, HashMap<String, String> properties); ArrayList<Long> getTimestamps(); HashMap<String, String> getProperties(); }
KmlTrack extends KmlLineString { public ArrayList<Long> getTimestamps() { return mTimestamps; } KmlTrack(ArrayList<LatLng> coordinates, ArrayList<Double> altitudes, ArrayList<Long> timestamps, HashMap<String, String> properties); ArrayList<Long> getTimestamps(); HashMap<String, String> getProperties(); }
@Test public void testMultiGeometries() throws Exception { XmlPullParser xmlPullParser = createParser("amu_nested_multigeometry.kml"); KmlPlacemark feature = KmlFeatureParser.createPlacemark(xmlPullParser); assertEquals(feature.getProperty("name"), "multiPointLine"); assertEquals(feature.getProperty("description"), "Ne...
static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(eventType == END_TAG &&...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
KmlFeatureParser { static KmlPlacemark createPlacemark(XmlPullParser parser) throws IOException, XmlPullParserException { String styleId = null; KmlStyle inlineStyle = null; HashMap<String, String> properties = new HashMap<String, String>(); Geometry geometry = null; int eventType = parser.getEventType(); while (!(even...
@Test public void testGetGeometryType() { List<LineString> lineStrings = new ArrayList<>(); lineStrings.add( new LineString( new ArrayList<>(Arrays.asList(new LatLng(0, 0), new LatLng(50, 50))))); lineStrings.add( new LineString( new ArrayList<>(Arrays.asList(new LatLng(56, 65), new LatLng(23, 23))))); mg = new MultiGe...
public String getGeometryType() { return geometryType; }
MultiGeometry implements Geometry { public String getGeometryType() { return geometryType; } }
MultiGeometry implements Geometry { public String getGeometryType() { return geometryType; } MultiGeometry(List<? extends Geometry> geometries); }
MultiGeometry implements Geometry { public String getGeometryType() { return geometryType; } MultiGeometry(List<? extends Geometry> geometries); String getGeometryType(); List<Geometry> getGeometryObject(); void setGeometryType(String type); @Override String toString(); }
MultiGeometry implements Geometry { public String getGeometryType() { return geometryType; } MultiGeometry(List<? extends Geometry> geometries); String getGeometryType(); List<Geometry> getGeometryObject(); void setGeometryType(String type); @Override String toString(); }
@Test public void testSetGeometryType() { List<LineString> lineStrings = new ArrayList<>(); lineStrings.add( new LineString( new ArrayList<>(Arrays.asList(new LatLng(0, 0), new LatLng(50, 50))))); lineStrings.add( new LineString( new ArrayList<>(Arrays.asList(new LatLng(56, 65), new LatLng(23, 23))))); mg = new MultiGe...
public void setGeometryType(String type) { geometryType = type; }
MultiGeometry implements Geometry { public void setGeometryType(String type) { geometryType = type; } }
MultiGeometry implements Geometry { public void setGeometryType(String type) { geometryType = type; } MultiGeometry(List<? extends Geometry> geometries); }
MultiGeometry implements Geometry { public void setGeometryType(String type) { geometryType = type; } MultiGeometry(List<? extends Geometry> geometries); String getGeometryType(); List<Geometry> getGeometryObject(); void setGeometryType(String type); @Override String toString(); }
MultiGeometry implements Geometry { public void setGeometryType(String type) { geometryType = type; } MultiGeometry(List<? extends Geometry> geometries); String getGeometryType(); List<Geometry> getGeometryObject(); void setGeometryType(String type); @Override String toString(); }
@Test public void testGetGeometryObject() { List<Point> points = new ArrayList<>(); points.add(new Point(new LatLng(0, 0))); points.add(new Point(new LatLng(5, 5))); points.add(new Point(new LatLng(10, 10))); mg = new MultiGeometry(points); assertEquals(points, mg.getGeometryObject()); points = new ArrayList<>(); mg = ...
public List<Geometry> getGeometryObject() { return mGeometries; }
MultiGeometry implements Geometry { public List<Geometry> getGeometryObject() { return mGeometries; } }
MultiGeometry implements Geometry { public List<Geometry> getGeometryObject() { return mGeometries; } MultiGeometry(List<? extends Geometry> geometries); }
MultiGeometry implements Geometry { public List<Geometry> getGeometryObject() { return mGeometries; } MultiGeometry(List<? extends Geometry> geometries); String getGeometryType(); List<Geometry> getGeometryObject(); void setGeometryType(String type); @Override String toString(); }
MultiGeometry implements Geometry { public List<Geometry> getGeometryObject() { return mGeometries; } MultiGeometry(List<? extends Geometry> geometries); String getGeometryType(); List<Geometry> getGeometryObject(); void setGeometryType(String type); @Override String toString(); }
@Test public void testGetType() { LineString lineString = createSimpleLineString(); assertNotNull(lineString); assertNotNull(lineString.getGeometryType()); assertEquals("LineString", lineString.getGeometryType()); lineString = createLoopedLineString(); assertNotNull(lineString); assertNotNull(lineString.getGeometryType...
public String getGeometryType() { return GEOMETRY_TYPE; }
LineString implements Geometry<List<LatLng>> { public String getGeometryType() { return GEOMETRY_TYPE; } }
LineString implements Geometry<List<LatLng>> { public String getGeometryType() { return GEOMETRY_TYPE; } LineString(List<LatLng> coordinates); }
LineString implements Geometry<List<LatLng>> { public String getGeometryType() { return GEOMETRY_TYPE; } LineString(List<LatLng> coordinates); String getGeometryType(); List<LatLng> getGeometryObject(); @Override String toString(); }
LineString implements Geometry<List<LatLng>> { public String getGeometryType() { return GEOMETRY_TYPE; } LineString(List<LatLng> coordinates); String getGeometryType(); List<LatLng> getGeometryObject(); @Override String toString(); }
@Test public void testGetGeometryObject() { LineString lineString = createSimpleLineString(); assertNotNull(lineString); assertNotNull(lineString.getGeometryObject()); assertEquals(lineString.getGeometryObject().size(), 6); assertEquals(lineString.getGeometryObject().get(0).latitude, 90.0, 0); assertEquals(lineString.g...
public List<LatLng> getGeometryObject() { return mCoordinates; }
LineString implements Geometry<List<LatLng>> { public List<LatLng> getGeometryObject() { return mCoordinates; } }
LineString implements Geometry<List<LatLng>> { public List<LatLng> getGeometryObject() { return mCoordinates; } LineString(List<LatLng> coordinates); }
LineString implements Geometry<List<LatLng>> { public List<LatLng> getGeometryObject() { return mCoordinates; } LineString(List<LatLng> coordinates); String getGeometryType(); List<LatLng> getGeometryObject(); @Override String toString(); }
LineString implements Geometry<List<LatLng>> { public List<LatLng> getGeometryObject() { return mCoordinates; } LineString(List<LatLng> coordinates); String getGeometryType(); List<LatLng> getGeometryObject(); @Override String toString(); }
@Test public void testGetGeometryType() { assertTrue(Arrays.asList(pointStyle.getGeometryType()).contains("Point")); assertTrue(Arrays.asList(pointStyle.getGeometryType()).contains("MultiPoint")); assertTrue(Arrays.asList(pointStyle.getGeometryType()).contains("GeometryCollection")); assertEquals(3, pointStyle.getGeome...
@Override public String[] getGeometryType() { return GEOMETRY_TYPE; }
GeoJsonPointStyle extends Style implements GeoJsonStyle { @Override public String[] getGeometryType() { return GEOMETRY_TYPE; } }
GeoJsonPointStyle extends Style implements GeoJsonStyle { @Override public String[] getGeometryType() { return GEOMETRY_TYPE; } GeoJsonPointStyle(); }
GeoJsonPointStyle extends Style implements GeoJsonStyle { @Override public String[] getGeometryType() { return GEOMETRY_TYPE; } GeoJsonPointStyle(); @Override String[] getGeometryType(); float getAlpha(); void setAlpha(float alpha); float getAnchorU(); float getAnchorV(); void setAnchor(float anchorU, float anchorV); b...
GeoJsonPointStyle extends Style implements GeoJsonStyle { @Override public String[] getGeometryType() { return GEOMETRY_TYPE; } GeoJsonPointStyle(); @Override String[] getGeometryType(); float getAlpha(); void setAlpha(float alpha); float getAnchorU(); float getAnchorV(); void setAnchor(float anchorU, float anchorV); b...
@Test public void testGetFeatures() { int featureCount = 0; for (Feature ignored : mLayer.getFeatures()) { featureCount++; } assertEquals(3, featureCount); }
public Iterable<GeoJsonFeature> getFeatures() { return (Iterable<GeoJsonFeature>) super.getFeatures(); }
GeoJsonLayer extends Layer { public Iterable<GeoJsonFeature> getFeatures() { return (Iterable<GeoJsonFeature>) super.getFeatures(); } }
GeoJsonLayer extends Layer { public Iterable<GeoJsonFeature> getFeatures() { return (Iterable<GeoJsonFeature>) super.getFeatures(); } GeoJsonLayer(GoogleMap map, JSONObject geoJsonFile, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager...
GeoJsonLayer extends Layer { public Iterable<GeoJsonFeature> getFeatures() { return (Iterable<GeoJsonFeature>) super.getFeatures(); } GeoJsonLayer(GoogleMap map, JSONObject geoJsonFile, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager...
GeoJsonLayer extends Layer { public Iterable<GeoJsonFeature> getFeatures() { return (Iterable<GeoJsonFeature>) super.getFeatures(); } GeoJsonLayer(GoogleMap map, JSONObject geoJsonFile, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager...
@Test public void testAddFeature() { int featureCount = 0; mLayer.addFeature(new GeoJsonFeature(null, null, null, null)); for (Feature ignored : mLayer.getFeatures()) { featureCount++; } assertEquals(4, featureCount); }
public void addFeature(GeoJsonFeature feature) { if (feature == null) { throw new IllegalArgumentException("Feature cannot be null"); } super.addFeature(feature); }
GeoJsonLayer extends Layer { public void addFeature(GeoJsonFeature feature) { if (feature == null) { throw new IllegalArgumentException("Feature cannot be null"); } super.addFeature(feature); } }
GeoJsonLayer extends Layer { public void addFeature(GeoJsonFeature feature) { if (feature == null) { throw new IllegalArgumentException("Feature cannot be null"); } super.addFeature(feature); } GeoJsonLayer(GoogleMap map, JSONObject geoJsonFile, MarkerManager markerManager, PolygonManager polygonManager, PolylineManage...
GeoJsonLayer extends Layer { public void addFeature(GeoJsonFeature feature) { if (feature == null) { throw new IllegalArgumentException("Feature cannot be null"); } super.addFeature(feature); } GeoJsonLayer(GoogleMap map, JSONObject geoJsonFile, MarkerManager markerManager, PolygonManager polygonManager, PolylineManage...
GeoJsonLayer extends Layer { public void addFeature(GeoJsonFeature feature) { if (feature == null) { throw new IllegalArgumentException("Feature cannot be null"); } super.addFeature(feature); } GeoJsonLayer(GoogleMap map, JSONObject geoJsonFile, MarkerManager markerManager, PolygonManager polygonManager, PolylineManage...
@Test public void testRemoveFeature() { int featureCount = 0; for (Feature ignored : mLayer.getFeatures()) { featureCount++; } assertEquals(3, featureCount); }
public void removeFeature(GeoJsonFeature feature) { if (feature == null) { throw new IllegalArgumentException("Feature cannot be null"); } super.removeFeature(feature); }
GeoJsonLayer extends Layer { public void removeFeature(GeoJsonFeature feature) { if (feature == null) { throw new IllegalArgumentException("Feature cannot be null"); } super.removeFeature(feature); } }
GeoJsonLayer extends Layer { public void removeFeature(GeoJsonFeature feature) { if (feature == null) { throw new IllegalArgumentException("Feature cannot be null"); } super.removeFeature(feature); } GeoJsonLayer(GoogleMap map, JSONObject geoJsonFile, MarkerManager markerManager, PolygonManager polygonManager, Polyline...
GeoJsonLayer extends Layer { public void removeFeature(GeoJsonFeature feature) { if (feature == null) { throw new IllegalArgumentException("Feature cannot be null"); } super.removeFeature(feature); } GeoJsonLayer(GoogleMap map, JSONObject geoJsonFile, MarkerManager markerManager, PolygonManager polygonManager, Polyline...
GeoJsonLayer extends Layer { public void removeFeature(GeoJsonFeature feature) { if (feature == null) { throw new IllegalArgumentException("Feature cannot be null"); } super.removeFeature(feature); } GeoJsonLayer(GoogleMap map, JSONObject geoJsonFile, MarkerManager markerManager, PolygonManager polygonManager, Polyline...
@Test public void testProperties() { KmlTrack kmlTrack = createSimpleTrack(); assertNotNull(kmlTrack); assertNotNull(kmlTrack.getProperties()); assertEquals(kmlTrack.getProperties().size(), 1); assertEquals(kmlTrack.getProperties().get("key"), "value"); assertNull(kmlTrack.getProperties().get("missingKey")); }
public HashMap<String, String> getProperties() { return mProperties; }
KmlTrack extends KmlLineString { public HashMap<String, String> getProperties() { return mProperties; } }
KmlTrack extends KmlLineString { public HashMap<String, String> getProperties() { return mProperties; } KmlTrack(ArrayList<LatLng> coordinates, ArrayList<Double> altitudes, ArrayList<Long> timestamps, HashMap<String, String> properties); }
KmlTrack extends KmlLineString { public HashMap<String, String> getProperties() { return mProperties; } KmlTrack(ArrayList<LatLng> coordinates, ArrayList<Double> altitudes, ArrayList<Long> timestamps, HashMap<String, String> properties); ArrayList<Long> getTimestamps(); HashMap<String, String> getProperties(); }
KmlTrack extends KmlLineString { public HashMap<String, String> getProperties() { return mProperties; } KmlTrack(ArrayList<LatLng> coordinates, ArrayList<Double> altitudes, ArrayList<Long> timestamps, HashMap<String, String> properties); ArrayList<Long> getTimestamps(); HashMap<String, String> getProperties(); }
@Test public void testGetBoundingBox() { assertEquals( new LatLngBounds(new LatLng(-80, -150), new LatLng(80, 150)), mLayer.getBoundingBox()); }
public LatLngBounds getBoundingBox() { return mBoundingBox; }
GeoJsonLayer extends Layer { public LatLngBounds getBoundingBox() { return mBoundingBox; } }
GeoJsonLayer extends Layer { public LatLngBounds getBoundingBox() { return mBoundingBox; } GeoJsonLayer(GoogleMap map, JSONObject geoJsonFile, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager); GeoJsonLayer(GoogleMap map, int resourc...
GeoJsonLayer extends Layer { public LatLngBounds getBoundingBox() { return mBoundingBox; } GeoJsonLayer(GoogleMap map, JSONObject geoJsonFile, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager); GeoJsonLayer(GoogleMap map, int resourc...
GeoJsonLayer extends Layer { public LatLngBounds getBoundingBox() { return mBoundingBox; } GeoJsonLayer(GoogleMap map, JSONObject geoJsonFile, MarkerManager markerManager, PolygonManager polygonManager, PolylineManager polylineManager, GroundOverlayManager groundOverlayManager); GeoJsonLayer(GoogleMap map, int resourc...
@Test public void testGetGeometryType() { assertTrue(Arrays.asList(lineStringStyle.getGeometryType()).contains("LineString")); assertTrue(Arrays.asList(lineStringStyle.getGeometryType()).contains("MultiLineString")); assertTrue(Arrays.asList(lineStringStyle.getGeometryType()).contains("GeometryCollection")); assertEqua...
@Override public String[] getGeometryType() { return GEOMETRY_TYPE; }
GeoJsonLineStringStyle extends Style implements GeoJsonStyle { @Override public String[] getGeometryType() { return GEOMETRY_TYPE; } }
GeoJsonLineStringStyle extends Style implements GeoJsonStyle { @Override public String[] getGeometryType() { return GEOMETRY_TYPE; } GeoJsonLineStringStyle(); }
GeoJsonLineStringStyle extends Style implements GeoJsonStyle { @Override public String[] getGeometryType() { return GEOMETRY_TYPE; } GeoJsonLineStringStyle(); @Override String[] getGeometryType(); int getColor(); void setColor(int color); boolean isClickable(); void setClickable(boolean clickable); boolean isGeodesic()...
GeoJsonLineStringStyle extends Style implements GeoJsonStyle { @Override public String[] getGeometryType() { return GEOMETRY_TYPE; } GeoJsonLineStringStyle(); @Override String[] getGeometryType(); int getColor(); void setColor(int color); boolean isClickable(); void setClickable(boolean clickable); boolean isGeodesic()...
@Test public void testParseGeoJson() throws Exception { JSONObject validGeoJsonObject = new JSONObject( "{ \"type\": \"MultiLineString\",\n" + " \"coordinates\": [\n" + " [ [100.0, 0.0], [101.0, 1.0] ],\n" + " [ [102.0, 2.0], [103.0, 3.0] ]\n" + " ]\n" + " }"); GeoJsonParser parser = new GeoJsonParser(validGeoJsonObjec...
private void parseGeoJson() { try { GeoJsonFeature feature; String type = mGeoJsonFile.getString("type"); if (type.equals(FEATURE)) { feature = parseFeature(mGeoJsonFile); if (feature != null) { mGeoJsonFeatures.add(feature); } } else if (type.equals(FEATURE_COLLECTION)) { mGeoJsonFeatures.addAll(parseFeatureCollection...
GeoJsonParser { private void parseGeoJson() { try { GeoJsonFeature feature; String type = mGeoJsonFile.getString("type"); if (type.equals(FEATURE)) { feature = parseFeature(mGeoJsonFile); if (feature != null) { mGeoJsonFeatures.add(feature); } } else if (type.equals(FEATURE_COLLECTION)) { mGeoJsonFeatures.addAll(parseF...
GeoJsonParser { private void parseGeoJson() { try { GeoJsonFeature feature; String type = mGeoJsonFile.getString("type"); if (type.equals(FEATURE)) { feature = parseFeature(mGeoJsonFile); if (feature != null) { mGeoJsonFeatures.add(feature); } } else if (type.equals(FEATURE_COLLECTION)) { mGeoJsonFeatures.addAll(parseF...
GeoJsonParser { private void parseGeoJson() { try { GeoJsonFeature feature; String type = mGeoJsonFile.getString("type"); if (type.equals(FEATURE)) { feature = parseFeature(mGeoJsonFile); if (feature != null) { mGeoJsonFeatures.add(feature); } } else if (type.equals(FEATURE_COLLECTION)) { mGeoJsonFeatures.addAll(parseF...
GeoJsonParser { private void parseGeoJson() { try { GeoJsonFeature feature; String type = mGeoJsonFile.getString("type"); if (type.equals(FEATURE)) { feature = parseFeature(mGeoJsonFile); if (feature != null) { mGeoJsonFeatures.add(feature); } } else if (type.equals(FEATURE_COLLECTION)) { mGeoJsonFeatures.addAll(parseF...
@Test public void testParseGeometryCollection() throws Exception { GeoJsonParser parser = new GeoJsonParser(validGeometryCollection()); assertEquals(1, parser.getFeatures().size()); for (GeoJsonFeature feature : parser.getFeatures()) { assertEquals("GeometryCollection", feature.getGeometry().getGeometryType()); int siz...
ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; }
GeoJsonParser { ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; } }
GeoJsonParser { ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; } GeoJsonParser(JSONObject geoJsonFile); }
GeoJsonParser { ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; } GeoJsonParser(JSONObject geoJsonFile); static Geometry parseGeometry(JSONObject geoJsonGeometry); }
GeoJsonParser { ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; } GeoJsonParser(JSONObject geoJsonFile); static Geometry parseGeometry(JSONObject geoJsonGeometry); }
@Test public void testParseMultiPolygon() throws Exception { GeoJsonParser parser = new GeoJsonParser(validMultiPolygon()); assertEquals(1, parser.getFeatures().size()); GeoJsonFeature feature = parser.getFeatures().get(0); GeoJsonMultiPolygon polygon = ((GeoJsonMultiPolygon) feature.getGeometry()); assertEquals(2, pol...
ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; }
GeoJsonParser { ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; } }
GeoJsonParser { ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; } GeoJsonParser(JSONObject geoJsonFile); }
GeoJsonParser { ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; } GeoJsonParser(JSONObject geoJsonFile); static Geometry parseGeometry(JSONObject geoJsonGeometry); }
GeoJsonParser { ArrayList<GeoJsonFeature> getFeatures() { return mGeoJsonFeatures; } GeoJsonParser(JSONObject geoJsonFile); static Geometry parseGeometry(JSONObject geoJsonGeometry); }
@Test public void testGetType() { List<GeoJsonLineString> lineStrings = new ArrayList<>(); lineStrings.add( new GeoJsonLineString( new ArrayList<>(Arrays.asList(new LatLng(0, 0), new LatLng(50, 50))))); lineStrings.add( new GeoJsonLineString( new ArrayList<>(Arrays.asList(new LatLng(80, 10), new LatLng(-54, 12.7))))); ...
public String getType() { return getGeometryType(); }
GeoJsonMultiLineString extends MultiGeometry { public String getType() { return getGeometryType(); } }
GeoJsonMultiLineString extends MultiGeometry { public String getType() { return getGeometryType(); } GeoJsonMultiLineString(List<GeoJsonLineString> geoJsonLineStrings); }
GeoJsonMultiLineString extends MultiGeometry { public String getType() { return getGeometryType(); } GeoJsonMultiLineString(List<GeoJsonLineString> geoJsonLineStrings); String getType(); List<GeoJsonLineString> getLineStrings(); }
GeoJsonMultiLineString extends MultiGeometry { public String getType() { return getGeometryType(); } GeoJsonMultiLineString(List<GeoJsonLineString> geoJsonLineStrings); String getType(); List<GeoJsonLineString> getLineStrings(); }
@Test public void testGetLineStrings() { List<GeoJsonLineString> lineStrings = new ArrayList<>(); lineStrings.add( new GeoJsonLineString( new ArrayList<>(Arrays.asList(new LatLng(0, 0), new LatLng(50, 50))))); lineStrings.add( new GeoJsonLineString( new ArrayList<>(Arrays.asList(new LatLng(80, 10), new LatLng(-54, 12.7...
public List<GeoJsonLineString> getLineStrings() { List<Geometry> geometryList = getGeometryObject(); ArrayList<GeoJsonLineString> geoJsonLineStrings = new ArrayList<GeoJsonLineString>(); for (Geometry geometry : geometryList) { GeoJsonLineString lineString = (GeoJsonLineString) geometry; geoJsonLineStrings.add(lineStri...
GeoJsonMultiLineString extends MultiGeometry { public List<GeoJsonLineString> getLineStrings() { List<Geometry> geometryList = getGeometryObject(); ArrayList<GeoJsonLineString> geoJsonLineStrings = new ArrayList<GeoJsonLineString>(); for (Geometry geometry : geometryList) { GeoJsonLineString lineString = (GeoJsonLineSt...
GeoJsonMultiLineString extends MultiGeometry { public List<GeoJsonLineString> getLineStrings() { List<Geometry> geometryList = getGeometryObject(); ArrayList<GeoJsonLineString> geoJsonLineStrings = new ArrayList<GeoJsonLineString>(); for (Geometry geometry : geometryList) { GeoJsonLineString lineString = (GeoJsonLineSt...
GeoJsonMultiLineString extends MultiGeometry { public List<GeoJsonLineString> getLineStrings() { List<Geometry> geometryList = getGeometryObject(); ArrayList<GeoJsonLineString> geoJsonLineStrings = new ArrayList<GeoJsonLineString>(); for (Geometry geometry : geometryList) { GeoJsonLineString lineString = (GeoJsonLineSt...
GeoJsonMultiLineString extends MultiGeometry { public List<GeoJsonLineString> getLineStrings() { List<Geometry> geometryList = getGeometryObject(); ArrayList<GeoJsonLineString> geoJsonLineStrings = new ArrayList<GeoJsonLineString>(); for (Geometry geometry : geometryList) { GeoJsonLineString lineString = (GeoJsonLineSt...
@Test public void testGeometry() { GeoJsonFeature feature = new GeoJsonFeature(null, null, null, null); assertNull(feature.getGeometry()); GeoJsonPoint point = new GeoJsonPoint(new LatLng(0, 0)); feature.setGeometry(point); assertEquals(point, feature.getGeometry()); feature.setGeometry(null); assertNull(feature.getGeo...
public void setGeometry(Geometry geometry) { super.setGeometry(geometry); setChanged(); notifyObservers(); }
GeoJsonFeature extends Feature implements Observer { public void setGeometry(Geometry geometry) { super.setGeometry(geometry); setChanged(); notifyObservers(); } }
GeoJsonFeature extends Feature implements Observer { public void setGeometry(Geometry geometry) { super.setGeometry(geometry); setChanged(); notifyObservers(); } GeoJsonFeature(Geometry geometry, String id, HashMap<String, String> properties, LatLngBounds boundingBox); }
GeoJsonFeature extends Feature implements Observer { public void setGeometry(Geometry geometry) { super.setGeometry(geometry); setChanged(); notifyObservers(); } GeoJsonFeature(Geometry geometry, String id, HashMap<String, String> properties, LatLngBounds boundingBox); String setProperty(Strin...
GeoJsonFeature extends Feature implements Observer { public void setGeometry(Geometry geometry) { super.setGeometry(geometry); setChanged(); notifyObservers(); } GeoJsonFeature(Geometry geometry, String id, HashMap<String, String> properties, LatLngBounds boundingBox); String setProperty(Strin...
@Test public void testGetBoundingBox() { GeoJsonFeature feature = new GeoJsonFeature(null, null, null, null); assertNull(feature.getBoundingBox()); LatLngBounds boundingBox = new LatLngBounds(new LatLng(-20, -20), new LatLng(50, 50)); feature = new GeoJsonFeature(null, null, null, boundingBox); assertEquals(boundingBox...
public LatLngBounds getBoundingBox() { return mBoundingBox; }
GeoJsonFeature extends Feature implements Observer { public LatLngBounds getBoundingBox() { return mBoundingBox; } }
GeoJsonFeature extends Feature implements Observer { public LatLngBounds getBoundingBox() { return mBoundingBox; } GeoJsonFeature(Geometry geometry, String id, HashMap<String, String> properties, LatLngBounds boundingBox); }
GeoJsonFeature extends Feature implements Observer { public LatLngBounds getBoundingBox() { return mBoundingBox; } GeoJsonFeature(Geometry geometry, String id, HashMap<String, String> properties, LatLngBounds boundingBox); String setProperty(String property, String propertyValue); String remov...
GeoJsonFeature extends Feature implements Observer { public LatLngBounds getBoundingBox() { return mBoundingBox; } GeoJsonFeature(Geometry geometry, String id, HashMap<String, String> properties, LatLngBounds boundingBox); String setProperty(String property, String propertyValue); String remov...
@Test public void testGetType() { List<LatLng> coordinates = new ArrayList<>(); coordinates.add(new LatLng(0, 0)); coordinates.add(new LatLng(50, 50)); coordinates.add(new LatLng(100, 100)); ls = new GeoJsonLineString(coordinates); assertEquals("LineString", ls.getType()); }
public String getType() { return getGeometryType(); }
GeoJsonLineString extends LineString { public String getType() { return getGeometryType(); } }
GeoJsonLineString extends LineString { public String getType() { return getGeometryType(); } GeoJsonLineString(List<LatLng> coordinates); GeoJsonLineString(List<LatLng> coordinates, List<Double> altitudes); }
GeoJsonLineString extends LineString { public String getType() { return getGeometryType(); } GeoJsonLineString(List<LatLng> coordinates); GeoJsonLineString(List<LatLng> coordinates, List<Double> altitudes); String getType(); List<LatLng> getCoordinates(); List<Double> getAltitudes(); }
GeoJsonLineString extends LineString { public String getType() { return getGeometryType(); } GeoJsonLineString(List<LatLng> coordinates); GeoJsonLineString(List<LatLng> coordinates, List<Double> altitudes); String getType(); List<LatLng> getCoordinates(); List<Double> getAltitudes(); }
@Test public void testGetGeometry() { KmlMultiGeometry kmlMultiGeometry = createMultiGeometry(); Assert.assertNotNull(kmlMultiGeometry); Assert.assertEquals(1, kmlMultiGeometry.getGeometryObject().size()); KmlLineString lineString = ((KmlLineString) kmlMultiGeometry.getGeometryObject().get(0)); Assert.assertNotNull(lin...
public ArrayList<Geometry> getGeometryObject() { List<Geometry> geometriesList = super.getGeometryObject(); return new ArrayList<>(geometriesList); }
KmlMultiGeometry extends MultiGeometry { public ArrayList<Geometry> getGeometryObject() { List<Geometry> geometriesList = super.getGeometryObject(); return new ArrayList<>(geometriesList); } }
KmlMultiGeometry extends MultiGeometry { public ArrayList<Geometry> getGeometryObject() { List<Geometry> geometriesList = super.getGeometryObject(); return new ArrayList<>(geometriesList); } KmlMultiGeometry(ArrayList<Geometry> geometries); }
KmlMultiGeometry extends MultiGeometry { public ArrayList<Geometry> getGeometryObject() { List<Geometry> geometriesList = super.getGeometryObject(); return new ArrayList<>(geometriesList); } KmlMultiGeometry(ArrayList<Geometry> geometries); ArrayList<Geometry> getGeometryObject(); @Override String toString(); }
KmlMultiGeometry extends MultiGeometry { public ArrayList<Geometry> getGeometryObject() { List<Geometry> geometriesList = super.getGeometryObject(); return new ArrayList<>(geometriesList); } KmlMultiGeometry(ArrayList<Geometry> geometries); ArrayList<Geometry> getGeometryObject(); @Override String toString(); }