Просмотр исходного кода

Updating gitignore and finishing Query class method instance

Dawson 1 месяц назад
Родитель
Сommit
00848d73ee
6 измененных файлов с 10 добавлено и 41 удалено
  1. 2 1
      .gitignore
  2. 0 8
      .idea/.gitignore
  3. 0 17
      .idea/gradle.xml
  4. 0 7
      .idea/misc.xml
  5. 0 6
      .idea/vcs.xml
  6. 8 2
      src/main/java/me/dawson/teleport/query/Query.java

+ 2 - 1
.gitignore

@@ -13,6 +13,7 @@ build/
 *.iml
 *.ipr
 out/
+/.idea/
 !**/src/main/**/out/
 !**/src/test/**/out/
 
@@ -39,4 +40,4 @@ bin/
 .vscode/
 
 ### Mac OS ###
-.DS_Store
+.DS_Store

+ 0 - 8
.idea/.gitignore

@@ -1,8 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Editor-based HTTP Client requests
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml

+ 0 - 17
.idea/gradle.xml

@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="GradleSettings">
-    <option name="linkedExternalProjectsSettings">
-      <GradleProjectSettings>
-        <option name="externalProjectPath" value="$PROJECT_DIR$" />
-        <option name="gradleHome" value="" />
-        <option name="gradleJvm" value="jbrsdk_jcef-17" />
-        <option name="modules">
-          <set>
-            <option value="$PROJECT_DIR$" />
-          </set>
-        </option>
-      </GradleProjectSettings>
-    </option>
-  </component>
-</project>

+ 0 - 7
.idea/misc.xml

@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="ExternalStorageConfigurationManager" enabled="true" />
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="corretto-21" project-jdk-type="JavaSDK">
-    <output url="file://$PROJECT_DIR$/out" />
-  </component>
-</project>

+ 0 - 6
.idea/vcs.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="VcsDirectoryMappings">
-    <mapping directory="$PROJECT_DIR$" vcs="Git" />
-  </component>
-</project>

+ 8 - 2
src/main/java/me/dawson/teleport/query/Query.java

@@ -18,10 +18,16 @@ public abstract class Query {
     public abstract Response run();
 
     public static IntermediateQuery of(Set<Path> paths) {
-        return this.IntermediateQuery;
+        return new IntermediateQuery(paths);
     }
 
-    class IntermediateQuery {
+    static class IntermediateQuery {
+        private final Set<Path> paths;
+
+        protected IntermediateQuery(Set<Path> paths) {
+            this.paths = paths;
+        }
+
         public PossibleInCount jumpCount(String city, int jumps) {
             return new PossibleInCount(paths, city, jumps);
         }