koppeling voorkomst, ander algoritme
This commit is contained in:
parent
b08239daba
commit
984c1e3005
|
@ -11,36 +11,41 @@
|
||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="FileEditorManager">
|
<component name="FileEditorManager">
|
||||||
<leaf>
|
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||||
<file leaf-file-name="Dictee.java" pinned="false" current-in-tab="true">
|
<file leaf-file-name="Dictee.java" pinned="false" current-in-tab="true">
|
||||||
<entry file="file://$PROJECT_DIR$/src/com/brainbaking/dictee/Dictee.java">
|
<entry file="file://$PROJECT_DIR$/src/com/brainbaking/dictee/Dictee.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="370">
|
<state relative-caret-position="986">
|
||||||
<caret line="49" column="0" lean-forward="true" selection-start-line="49" selection-start-column="0" selection-end-line="49" selection-end-column="0" />
|
<caret line="58" column="0" lean-forward="false" selection-start-line="58" selection-start-column="0" selection-end-line="58" selection-end-column="0" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
<element signature="e#1018#1024#0" expanded="true" />
|
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file leaf-file-name="Diff.java" pinned="false" current-in-tab="false">
|
<file leaf-file-name="Tuple.java" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/src/com/brainbaking/dictee/Diff.java">
|
<entry file="file://$PROJECT_DIR$/src/com/brainbaking/dictee/Tuple.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="256">
|
<state relative-caret-position="300">
|
||||||
<caret line="19" column="31" lean-forward="false" selection-start-line="19" selection-start-column="31" selection-end-line="19" selection-end-column="31" />
|
<caret line="20" column="45" lean-forward="false" selection-start-line="20" selection-start-column="45" selection-end-line="20" selection-end-column="45" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="e#172#173#0" expanded="true" />
|
<element signature="e#208#209#0" expanded="true" />
|
||||||
<element signature="e#200#201#0" expanded="true" />
|
<element signature="e#251#252#0" expanded="true" />
|
||||||
<element signature="e#392#393#0" expanded="true" />
|
<element signature="e#310#311#0" expanded="true" />
|
||||||
<element signature="e#432#433#0" expanded="true" />
|
<element signature="e#368#369#0" expanded="true" />
|
||||||
<element signature="e#493#494#0" expanded="true" />
|
<element signature="e#437#438#0" expanded="true" />
|
||||||
<element signature="e#541#542#0" expanded="true" />
|
<element signature="e#498#499#0" expanded="true" />
|
||||||
<element signature="e#597#598#0" expanded="true" />
|
<element signature="e#542#543#0" expanded="true" />
|
||||||
<element signature="e#645#646#0" expanded="true" />
|
<element signature="e#598#599#0" expanded="true" />
|
||||||
<element signature="e#691#692#0" expanded="true" />
|
<element signature="e#641#642#0" expanded="true" />
|
||||||
<element signature="e#750#751#0" expanded="true" />
|
<element signature="e#683#684#0" expanded="true" />
|
||||||
|
<element signature="e#724#725#0" expanded="true" />
|
||||||
|
<element signature="e#764#765#0" expanded="true" />
|
||||||
|
<element signature="e#793#794#0" expanded="true" />
|
||||||
|
<element signature="e#821#822#0" expanded="true" />
|
||||||
|
<element signature="e#1075#1076#0" expanded="true" />
|
||||||
|
<element signature="e#1141#1142#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
@ -49,12 +54,12 @@
|
||||||
<file leaf-file-name="DicteeTests.java" pinned="false" current-in-tab="false">
|
<file leaf-file-name="DicteeTests.java" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/test/com/brainbaking/dictee/DicteeTests.java">
|
<entry file="file://$PROJECT_DIR$/test/com/brainbaking/dictee/DicteeTests.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="341">
|
<state relative-caret-position="960">
|
||||||
<caret line="20" column="0" lean-forward="true" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
|
<caret line="64" column="0" lean-forward="false" selection-start-line="64" selection-start-column="0" selection-end-line="64" selection-end-column="0" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
<element signature="e#1807#1808#0" expanded="true" />
|
<element signature="e#2176#2177#0" expanded="true" />
|
||||||
<element signature="e#1869#1870#0" expanded="true" />
|
<element signature="e#2238#2239#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
@ -77,8 +82,9 @@
|
||||||
<component name="IdeDocumentHistory">
|
<component name="IdeDocumentHistory">
|
||||||
<option name="CHANGED_PATHS">
|
<option name="CHANGED_PATHS">
|
||||||
<list>
|
<list>
|
||||||
<option value="$PROJECT_DIR$/test/com/brainbaking/dictee/DicteeTests.java" />
|
|
||||||
<option value="$PROJECT_DIR$/src/com/brainbaking/dictee/Diff.java" />
|
<option value="$PROJECT_DIR$/src/com/brainbaking/dictee/Diff.java" />
|
||||||
|
<option value="$PROJECT_DIR$/test/com/brainbaking/dictee/DicteeTests.java" />
|
||||||
|
<option value="$PROJECT_DIR$/src/com/brainbaking/dictee/Tuple.java" />
|
||||||
<option value="$PROJECT_DIR$/src/com/brainbaking/dictee/Dictee.java" />
|
<option value="$PROJECT_DIR$/src/com/brainbaking/dictee/Dictee.java" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
|
@ -88,6 +94,25 @@
|
||||||
<option name="width" value="720" />
|
<option name="width" value="720" />
|
||||||
<option name="height" value="436" />
|
<option name="height" value="436" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="ProjectInspectionProfilesVisibleTreeState">
|
||||||
|
<entry key="Project Default">
|
||||||
|
<profile-state>
|
||||||
|
<expanded-state>
|
||||||
|
<State>
|
||||||
|
<id />
|
||||||
|
</State>
|
||||||
|
<State>
|
||||||
|
<id>Spelling</id>
|
||||||
|
</State>
|
||||||
|
</expanded-state>
|
||||||
|
<selected-state>
|
||||||
|
<State>
|
||||||
|
<id>SpellCheckingInspection</id>
|
||||||
|
</State>
|
||||||
|
</selected-state>
|
||||||
|
</profile-state>
|
||||||
|
</entry>
|
||||||
|
</component>
|
||||||
<component name="ProjectView">
|
<component name="ProjectView">
|
||||||
<navigator currentView="ProjectPane" proportions="" version="1">
|
<navigator currentView="ProjectPane" proportions="" version="1">
|
||||||
<flattenPackages />
|
<flattenPackages />
|
||||||
|
@ -103,10 +128,10 @@
|
||||||
<foldersAlwaysOnTop value="true" />
|
<foldersAlwaysOnTop value="true" />
|
||||||
</navigator>
|
</navigator>
|
||||||
<panes>
|
<panes>
|
||||||
<pane id="AndroidView" />
|
|
||||||
<pane id="PackagesPane" />
|
|
||||||
<pane id="Scope" />
|
|
||||||
<pane id="Scratches" />
|
<pane id="Scratches" />
|
||||||
|
<pane id="Scope" />
|
||||||
|
<pane id="PackagesPane" />
|
||||||
|
<pane id="AndroidView" />
|
||||||
<pane id="ProjectPane">
|
<pane id="ProjectPane">
|
||||||
<subPane>
|
<subPane>
|
||||||
<expand>
|
<expand>
|
||||||
|
@ -154,6 +179,7 @@
|
||||||
<property name="project.structure.last.edited" value="Libraries" />
|
<property name="project.structure.last.edited" value="Libraries" />
|
||||||
<property name="project.structure.proportion" value="0.0" />
|
<property name="project.structure.proportion" value="0.0" />
|
||||||
<property name="project.structure.side.proportion" value="0.2" />
|
<property name="project.structure.side.proportion" value="0.2" />
|
||||||
|
<property name="extract.method.default.visibility" value="private" />
|
||||||
</component>
|
</component>
|
||||||
<component name="RunDashboard">
|
<component name="RunDashboard">
|
||||||
<option name="ruleStates">
|
<option name="ruleStates">
|
||||||
|
@ -264,6 +290,56 @@
|
||||||
<envs />
|
<envs />
|
||||||
<patterns />
|
<patterns />
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<configuration name="DicteeTests.combinatieGeval_zonderHoofdletters" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||||
|
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
|
||||||
|
<pattern>
|
||||||
|
<option name="PATTERN" value="com.brainbaking.dictee.*" />
|
||||||
|
<option name="ENABLED" value="true" />
|
||||||
|
</pattern>
|
||||||
|
</extension>
|
||||||
|
<module name="java" />
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH" />
|
||||||
|
<option name="PACKAGE_NAME" value="com.brainbaking.dictee" />
|
||||||
|
<option name="MAIN_CLASS_NAME" value="com.brainbaking.dictee.DicteeTests" />
|
||||||
|
<option name="METHOD_NAME" value="combinatieGeval_zonderHoofdletters(java.lang.String)" />
|
||||||
|
<option name="TEST_OBJECT" value="method" />
|
||||||
|
<option name="VM_PARAMETERS" value="-ea" />
|
||||||
|
<option name="PARAMETERS" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
|
||||||
|
<option name="ENV_VARIABLES" />
|
||||||
|
<option name="PASS_PARENT_ENVS" value="true" />
|
||||||
|
<option name="TEST_SEARCH_SCOPE">
|
||||||
|
<value defaultName="singleModule" />
|
||||||
|
</option>
|
||||||
|
<envs />
|
||||||
|
<patterns />
|
||||||
|
</configuration>
|
||||||
|
<configuration name="DicteeTests.hoofdletters" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
|
||||||
|
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
|
||||||
|
<pattern>
|
||||||
|
<option name="PATTERN" value="com.brainbaking.dictee.*" />
|
||||||
|
<option name="ENABLED" value="true" />
|
||||||
|
</pattern>
|
||||||
|
</extension>
|
||||||
|
<module name="java" />
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH" />
|
||||||
|
<option name="PACKAGE_NAME" value="com.brainbaking.dictee" />
|
||||||
|
<option name="MAIN_CLASS_NAME" value="com.brainbaking.dictee.DicteeTests" />
|
||||||
|
<option name="METHOD_NAME" value="hoofdletters(java.lang.String)" />
|
||||||
|
<option name="TEST_OBJECT" value="method" />
|
||||||
|
<option name="VM_PARAMETERS" value="-ea" />
|
||||||
|
<option name="PARAMETERS" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
|
||||||
|
<option name="ENV_VARIABLES" />
|
||||||
|
<option name="PASS_PARENT_ENVS" value="true" />
|
||||||
|
<option name="TEST_SEARCH_SCOPE">
|
||||||
|
<value defaultName="singleModule" />
|
||||||
|
</option>
|
||||||
|
<envs />
|
||||||
|
<patterns />
|
||||||
|
</configuration>
|
||||||
<configuration default="true" type="JUnit" factoryName="JUnit">
|
<configuration default="true" type="JUnit" factoryName="JUnit">
|
||||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||||
<module name="" />
|
<module name="" />
|
||||||
|
@ -324,16 +400,20 @@
|
||||||
<option name="PROGRAM_PARAMETERS" />
|
<option name="PROGRAM_PARAMETERS" />
|
||||||
<predefined_log_file id="idea.log" enabled="true" />
|
<predefined_log_file id="idea.log" enabled="true" />
|
||||||
</configuration>
|
</configuration>
|
||||||
<list size="3">
|
<list size="5">
|
||||||
<item index="0" class="java.lang.String" itemvalue="JUnit.DicteeTests" />
|
<item index="0" class="java.lang.String" itemvalue="JUnit.DicteeTests" />
|
||||||
<item index="1" class="java.lang.String" itemvalue="JUnit.DicteeTests.basisGevallen_zelfdeGrootte" />
|
<item index="1" class="java.lang.String" itemvalue="JUnit.DicteeTests.basisGevallen_zelfdeGrootte" />
|
||||||
<item index="2" class="java.lang.String" itemvalue="JUnit.DicteeTests.combinatieGeval_hoofdLetterEnKleineLetters" />
|
<item index="2" class="java.lang.String" itemvalue="JUnit.DicteeTests.combinatieGeval_hoofdLetterEnKleineLetters" />
|
||||||
|
<item index="3" class="java.lang.String" itemvalue="JUnit.DicteeTests.hoofdletters" />
|
||||||
|
<item index="4" class="java.lang.String" itemvalue="JUnit.DicteeTests.combinatieGeval_zonderHoofdletters" />
|
||||||
</list>
|
</list>
|
||||||
<recent_temporary>
|
<recent_temporary>
|
||||||
<list size="3">
|
<list size="5">
|
||||||
<item index="0" class="java.lang.String" itemvalue="JUnit.DicteeTests" />
|
<item index="0" class="java.lang.String" itemvalue="JUnit.DicteeTests" />
|
||||||
<item index="1" class="java.lang.String" itemvalue="JUnit.DicteeTests.combinatieGeval_hoofdLetterEnKleineLetters" />
|
<item index="1" class="java.lang.String" itemvalue="JUnit.DicteeTests.combinatieGeval_zonderHoofdletters" />
|
||||||
<item index="2" class="java.lang.String" itemvalue="JUnit.DicteeTests.basisGevallen_zelfdeGrootte" />
|
<item index="2" class="java.lang.String" itemvalue="JUnit.DicteeTests.hoofdletters" />
|
||||||
|
<item index="3" class="java.lang.String" itemvalue="JUnit.DicteeTests.combinatieGeval_hoofdLetterEnKleineLetters" />
|
||||||
|
<item index="4" class="java.lang.String" itemvalue="JUnit.DicteeTests.basisGevallen_zelfdeGrootte" />
|
||||||
</list>
|
</list>
|
||||||
</recent_temporary>
|
</recent_temporary>
|
||||||
</component>
|
</component>
|
||||||
|
@ -354,66 +434,66 @@
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TestHistory">
|
<component name="TestHistory">
|
||||||
<history-entry file="DicteeTests - 2018.03.14 at 22h 11m 09s.xml">
|
<history-entry file="DicteeTests - 2018.03.17 at 19h 10m 47s.xml">
|
||||||
<configuration name="DicteeTests" configurationId="JUnit" />
|
<configuration name="DicteeTests" configurationId="JUnit" />
|
||||||
</history-entry>
|
</history-entry>
|
||||||
<history-entry file="DicteeTests - 2018.03.14 at 22h 12m 58s.xml">
|
<history-entry file="DicteeTests - 2018.03.17 at 19h 11m 53s.xml">
|
||||||
<configuration name="DicteeTests" configurationId="JUnit" />
|
<configuration name="DicteeTests" configurationId="JUnit" />
|
||||||
</history-entry>
|
</history-entry>
|
||||||
<history-entry file="DicteeTests - 2018.03.14 at 22h 19m 54s.xml">
|
<history-entry file="DicteeTests - 2018.03.17 at 19h 14m 38s.xml">
|
||||||
<configuration name="DicteeTests" configurationId="JUnit" />
|
<configuration name="DicteeTests" configurationId="JUnit" />
|
||||||
</history-entry>
|
</history-entry>
|
||||||
<history-entry file="DicteeTests - 2018.03.14 at 22h 20m 38s.xml">
|
<history-entry file="DicteeTests - 2018.03.17 at 19h 15m 17s.xml">
|
||||||
<configuration name="DicteeTests" configurationId="JUnit" />
|
<configuration name="DicteeTests" configurationId="JUnit" />
|
||||||
</history-entry>
|
</history-entry>
|
||||||
<history-entry file="DicteeTests_combinatieGeval_hoofdLetterEnKleineLetters - 2018.03.14 at 22h 14m 42s.xml">
|
<history-entry file="DicteeTests - 2018.03.17 at 19h 16m 35s.xml">
|
||||||
<configuration name="DicteeTests.combinatieGeval_hoofdLetterEnKleineLetters" configurationId="JUnit" />
|
<configuration name="DicteeTests" configurationId="JUnit" />
|
||||||
</history-entry>
|
</history-entry>
|
||||||
<history-entry file="DicteeTests_combinatieGeval_hoofdLetterEnKleineLetters - 2018.03.14 at 22h 14m 58s.xml">
|
<history-entry file="DicteeTests_combinatieGeval_zonderHoofdletters - 2018.03.17 at 18h 28m 11s.xml">
|
||||||
<configuration name="DicteeTests.combinatieGeval_hoofdLetterEnKleineLetters" configurationId="JUnit" />
|
<configuration name="DicteeTests.combinatieGeval_zonderHoofdletters" configurationId="JUnit" />
|
||||||
</history-entry>
|
</history-entry>
|
||||||
<history-entry file="DicteeTests_combinatieGeval_hoofdLetterEnKleineLetters - 2018.03.14 at 22h 16m 00s.xml">
|
<history-entry file="DicteeTests_combinatieGeval_zonderHoofdletters - 2018.03.17 at 18h 28m 22s.xml">
|
||||||
<configuration name="DicteeTests.combinatieGeval_hoofdLetterEnKleineLetters" configurationId="JUnit" />
|
<configuration name="DicteeTests.combinatieGeval_zonderHoofdletters" configurationId="JUnit" />
|
||||||
</history-entry>
|
</history-entry>
|
||||||
<history-entry file="DicteeTests_combinatieGeval_hoofdLetterEnKleineLetters - 2018.03.14 at 22h 17m 00s.xml">
|
<history-entry file="DicteeTests_combinatieGeval_zonderHoofdletters - 2018.03.17 at 18h 28m 57s.xml">
|
||||||
<configuration name="DicteeTests.combinatieGeval_hoofdLetterEnKleineLetters" configurationId="JUnit" />
|
<configuration name="DicteeTests.combinatieGeval_zonderHoofdletters" configurationId="JUnit" />
|
||||||
</history-entry>
|
</history-entry>
|
||||||
<history-entry file="DicteeTests_combinatieGeval_hoofdLetterEnKleineLetters - 2018.03.14 at 22h 18m 30s.xml">
|
<history-entry file="DicteeTests_combinatieGeval_zonderHoofdletters - 2018.03.17 at 18h 29m 23s.xml">
|
||||||
<configuration name="DicteeTests.combinatieGeval_hoofdLetterEnKleineLetters" configurationId="JUnit" />
|
<configuration name="DicteeTests.combinatieGeval_zonderHoofdletters" configurationId="JUnit" />
|
||||||
</history-entry>
|
</history-entry>
|
||||||
<history-entry file="DicteeTests_combinatieGeval_hoofdLetterEnKleineLetters - 2018.03.14 at 22h 19m 45s.xml">
|
<history-entry file="DicteeTests_combinatieGeval_zonderHoofdletters - 2018.03.17 at 19h 10m 05s.xml">
|
||||||
<configuration name="DicteeTests.combinatieGeval_hoofdLetterEnKleineLetters" configurationId="JUnit" />
|
<configuration name="DicteeTests.combinatieGeval_zonderHoofdletters" configurationId="JUnit" />
|
||||||
</history-entry>
|
</history-entry>
|
||||||
</component>
|
</component>
|
||||||
<component name="ToolWindowManager">
|
<component name="ToolWindowManager">
|
||||||
<frame x="0" y="23" width="1280" height="873" extended-state="6" />
|
<frame x="0" y="23" width="1440" height="873" extended-state="6" />
|
||||||
<layout>
|
<layout>
|
||||||
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32958803" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32958803" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Palette	" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
<window_info id="Palette	" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
<window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
|
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||||
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32958803" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
<window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32958803" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
<window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.28125" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.125" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
|
<window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
|
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
||||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39950064" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39950064" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
|
||||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||||
|
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||||
</layout>
|
</layout>
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsContentAnnotationSettings">
|
<component name="VcsContentAnnotationSettings">
|
||||||
|
@ -421,25 +501,18 @@
|
||||||
</component>
|
</component>
|
||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
<breakpoints>
|
<option name="time" value="8" />
|
||||||
<line-breakpoint enabled="true" type="java-line">
|
|
||||||
<url>file://$PROJECT_DIR$/src/com/brainbaking/dictee/Dictee.java</url>
|
|
||||||
<line>56</line>
|
|
||||||
<properties />
|
|
||||||
<option name="timeStamp" value="2" />
|
|
||||||
</line-breakpoint>
|
|
||||||
<line-breakpoint enabled="true" type="java-line">
|
|
||||||
<url>file://$PROJECT_DIR$/src/com/brainbaking/dictee/Dictee.java</url>
|
|
||||||
<line>37</line>
|
|
||||||
<properties />
|
|
||||||
<option name="timeStamp" value="3" />
|
|
||||||
</line-breakpoint>
|
|
||||||
</breakpoints>
|
|
||||||
<option name="time" value="4" />
|
|
||||||
</breakpoint-manager>
|
</breakpoint-manager>
|
||||||
<watches-manager />
|
<watches-manager />
|
||||||
</component>
|
</component>
|
||||||
<component name="debuggerHistoryManager">
|
<component name="debuggerHistoryManager">
|
||||||
|
<expressions id="breakpointCondition">
|
||||||
|
<expression>
|
||||||
|
<expression-string>in == (int) 'k'</expression-string>
|
||||||
|
<language-id>JAVA</language-id>
|
||||||
|
<evaluation-mode>EXPRESSION</evaluation-mode>
|
||||||
|
</expression>
|
||||||
|
</expressions>
|
||||||
<expressions id="evaluateExpression">
|
<expressions id="evaluateExpression">
|
||||||
<expression>
|
<expression>
|
||||||
<expression-string>input.split("\\|")</expression-string>
|
<expression-string>input.split("\\|")</expression-string>
|
||||||
|
@ -459,52 +532,94 @@
|
||||||
</expressions>
|
</expressions>
|
||||||
</component>
|
</component>
|
||||||
<component name="editorHistoryManager">
|
<component name="editorHistoryManager">
|
||||||
<entry file="jar:///Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/lib/src.zip!/java.base/java/lang/NumberFormatException.java">
|
<entry file="file://$PROJECT_DIR$/src/com/brainbaking/dictee/Dictee.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="169">
|
<state relative-caret-position="0">
|
||||||
<caret line="64" column="0" lean-forward="false" selection-start-line="64" selection-start-column="0" selection-end-line="64" selection-end-column="0" />
|
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/test/com/brainbaking/dictee/DicteeTests.java">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="341">
|
|
||||||
<caret line="20" column="0" lean-forward="true" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
|
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
<element signature="e#1807#1808#0" expanded="true" />
|
|
||||||
<element signature="e#1869#1870#0" expanded="true" />
|
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/com/brainbaking/dictee/Diff.java">
|
<entry file="file://$PROJECT_DIR$/src/com/brainbaking/dictee/Diff.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="256">
|
<state relative-caret-position="240">
|
||||||
<caret line="19" column="31" lean-forward="false" selection-start-line="19" selection-start-column="31" selection-end-line="19" selection-end-column="31" />
|
<caret line="19" column="31" lean-forward="false" selection-start-line="19" selection-start-column="31" selection-end-line="19" selection-end-column="31" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/com/brainbaking/dictee/DicteeTests.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="240">
|
||||||
|
<caret line="20" column="0" lean-forward="true" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="e#172#173#0" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
<element signature="e#200#201#0" expanded="true" />
|
<element signature="e#2176#2177#0" expanded="true" />
|
||||||
<element signature="e#392#393#0" expanded="true" />
|
<element signature="e#2238#2239#0" expanded="true" />
|
||||||
<element signature="e#432#433#0" expanded="true" />
|
</folding>
|
||||||
<element signature="e#493#494#0" expanded="true" />
|
</state>
|
||||||
<element signature="e#541#542#0" expanded="true" />
|
</provider>
|
||||||
<element signature="e#597#598#0" expanded="true" />
|
</entry>
|
||||||
<element signature="e#645#646#0" expanded="true" />
|
<entry file="jar:///Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/lib/src.zip!/java.base/java/lang/NumberFormatException.java">
|
||||||
<element signature="e#691#692#0" expanded="true" />
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<element signature="e#750#751#0" expanded="true" />
|
<state relative-caret-position="169">
|
||||||
|
<caret line="64" column="0" lean-forward="false" selection-start-line="64" selection-start-column="0" selection-end-line="64" selection-end-column="0" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/com/brainbaking/dictee/Diff.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="285">
|
||||||
|
<caret line="19" column="31" lean-forward="false" selection-start-line="19" selection-start-column="31" selection-end-line="19" selection-end-column="31" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/src/com/brainbaking/dictee/Tuple.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="300">
|
||||||
|
<caret line="20" column="45" lean-forward="false" selection-start-line="20" selection-start-column="45" selection-end-line="20" selection-end-column="45" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#208#209#0" expanded="true" />
|
||||||
|
<element signature="e#251#252#0" expanded="true" />
|
||||||
|
<element signature="e#310#311#0" expanded="true" />
|
||||||
|
<element signature="e#368#369#0" expanded="true" />
|
||||||
|
<element signature="e#437#438#0" expanded="true" />
|
||||||
|
<element signature="e#498#499#0" expanded="true" />
|
||||||
|
<element signature="e#542#543#0" expanded="true" />
|
||||||
|
<element signature="e#598#599#0" expanded="true" />
|
||||||
|
<element signature="e#641#642#0" expanded="true" />
|
||||||
|
<element signature="e#683#684#0" expanded="true" />
|
||||||
|
<element signature="e#724#725#0" expanded="true" />
|
||||||
|
<element signature="e#764#765#0" expanded="true" />
|
||||||
|
<element signature="e#793#794#0" expanded="true" />
|
||||||
|
<element signature="e#821#822#0" expanded="true" />
|
||||||
|
<element signature="e#1075#1076#0" expanded="true" />
|
||||||
|
<element signature="e#1141#1142#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/com/brainbaking/dictee/DicteeTests.java">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="960">
|
||||||
|
<caret line="64" column="0" lean-forward="false" selection-start-line="64" selection-start-column="0" selection-end-line="64" selection-end-column="0" />
|
||||||
|
<folding>
|
||||||
|
<element signature="imports" expanded="true" />
|
||||||
|
<element signature="e#2176#2177#0" expanded="true" />
|
||||||
|
<element signature="e#2238#2239#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/src/com/brainbaking/dictee/Dictee.java">
|
<entry file="file://$PROJECT_DIR$/src/com/brainbaking/dictee/Dictee.java">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="370">
|
<state relative-caret-position="986">
|
||||||
<caret line="49" column="0" lean-forward="true" selection-start-line="49" selection-start-column="0" selection-end-line="49" selection-end-column="0" />
|
<caret line="58" column="0" lean-forward="false" selection-start-line="58" selection-start-column="0" selection-end-line="58" selection-end-column="0" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="imports" expanded="true" />
|
<element signature="imports" expanded="true" />
|
||||||
<element signature="e#1018#1024#0" expanded="true" />
|
|
||||||
</folding>
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
|
@ -1,68 +1,86 @@
|
||||||
package com.brainbaking.dictee;
|
package com.brainbaking.dictee;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Stack;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class Dictee {
|
public class Dictee {
|
||||||
|
|
||||||
|
|
||||||
private final String invoer;
|
private final String invoer;
|
||||||
private final String referentie;
|
private final String referentie;
|
||||||
|
|
||||||
public Dictee(String invoer, String referentie) {
|
public Dictee(String invoer, String referentie) {
|
||||||
this.invoer = invoer;
|
this.invoer = invoer;
|
||||||
this.referentie = referentie;
|
this.referentie = referentie;
|
||||||
|
|
||||||
System.out.println("Dictee: invoer \t" + invoer);
|
|
||||||
System.out.println("Dictee: referentie \t" + referentie);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<Character> getInvoerChars() {
|
private Tuple zoekIndexInInvoer(int in, List<Tuple> tuples) {
|
||||||
return invoer.chars().mapToObj(e->((char)e)).collect(Collectors.toList());
|
List<Tuple> laatstVoorkomendeTuple = tuples.stream().filter(t -> t.isChar(in)).collect(Collectors.toList());
|
||||||
}
|
int index = !laatstVoorkomendeTuple.isEmpty() ? laatstVoorkomendeTuple.get(laatstVoorkomendeTuple.size() - 1).getIndex() + 1 : 0;
|
||||||
|
|
||||||
private List<Character> getReferentie() {
|
int charTeZoeken = Character.isUpperCase(in) ? Character.toLowerCase(in) : Character.toUpperCase(in);
|
||||||
return referentie.chars().mapToObj(e->((char)e)).collect(Collectors.toList());
|
int indexFromIndexHf = invoer.indexOf(charTeZoeken, index);
|
||||||
|
int indexFromIndexGewoon = invoer.indexOf(in, index);
|
||||||
|
|
||||||
|
if(indexFromIndexGewoon >= 0 && indexFromIndexHf >= 0 && indexFromIndexGewoon > indexFromIndexHf) {
|
||||||
|
return Tuple.hoofdletter(in, indexFromIndexHf);
|
||||||
|
} else if(indexFromIndexGewoon == -1 && indexFromIndexHf >= 0) {
|
||||||
|
return Tuple.hoofdletter(in, indexFromIndexHf);
|
||||||
|
} else if(indexFromIndexGewoon == -1) {
|
||||||
|
return Tuple.nietGevonden(in);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Tuple(in, indexFromIndexGewoon);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int verbeter() {
|
public int verbeter() {
|
||||||
List<Character> in = getInvoerChars();
|
List<Tuple> tuples = berekenTupleLijst();
|
||||||
List<Character> inLower = in.stream().map(Character::toLowerCase).collect(Collectors.toList());
|
int score = 0;
|
||||||
List<Diff> diffs = new ArrayList<Diff>();
|
|
||||||
|
|
||||||
for(int i = 0; i < getReferentie().size(); i++) {
|
printStartDictee(tuples);
|
||||||
char refCurr = getReferentie().get(i);
|
|
||||||
|
|
||||||
int index = in.indexOf(refCurr);
|
for(int i = 0; i < tuples.size() - 1; i++) {
|
||||||
if(index >= 0) {
|
Tuple curr = tuples.get(i);
|
||||||
in.remove(index);
|
Tuple next = tuples.get(i + 1);
|
||||||
} else {
|
|
||||||
int lowerIndex = inLower.indexOf(Character.toLowerCase(refCurr));
|
|
||||||
if(lowerIndex >= 0) {
|
|
||||||
diffs.add(Diff.hoofdletter(refCurr, i));
|
|
||||||
|
|
||||||
in.remove((Character) Character.toLowerCase(refCurr));
|
|
||||||
in.remove((Character) Character.toUpperCase(refCurr));
|
|
||||||
} else {
|
|
||||||
diffs.add(Diff.create(refCurr, i));
|
|
||||||
|
|
||||||
in.remove(getInvoerChars().get(i));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if(curr.komtNietVoor()) {
|
||||||
|
score += 2;
|
||||||
|
} else if(curr.komtNietVoor() && next.komtNietVoor()) {
|
||||||
|
score += 2 * 2;
|
||||||
|
} else if(next.getIndex() - curr.getIndex() > 1) {
|
||||||
|
score += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
score += curr.getExtraMinpunt();
|
||||||
|
|
||||||
|
System.out.println("vgl " + i + " " + curr + " met " + (i + 1) + " " + next + " -- score: " + score);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Diff> diffsInLengte = in.stream().map(Diff::create).collect(Collectors.toList());
|
score += verhoogScoreIndienBeginGemist(tuples, score);
|
||||||
if(diffsInLengte.size() != diffs.size()) {
|
return score;
|
||||||
diffs.addAll(diffsInLengte);
|
}
|
||||||
|
|
||||||
|
private int verhoogScoreIndienBeginGemist(List<Tuple> tuples, int score) {
|
||||||
|
List<Integer> indexes = tuples.stream().mapToInt(t -> t.getIndex()).boxed().collect(Collectors.toList());
|
||||||
|
if(!indexes.contains(0) && !indexes.contains(-1)) {
|
||||||
|
return 2;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
diffs.forEach(System.out::println);
|
private List<Tuple> berekenTupleLijst() {
|
||||||
|
List<Tuple> tuples = new ArrayList<>();
|
||||||
|
for(int refI = 0; refI < referentie.length(); refI++) {
|
||||||
|
char ch = referentie.charAt(refI);
|
||||||
|
tuples.add(zoekIndexInInvoer(ch, tuples));
|
||||||
|
}
|
||||||
|
return tuples;
|
||||||
|
}
|
||||||
|
|
||||||
return diffs.stream()
|
private void printStartDictee(List<Tuple> tuples) {
|
||||||
.mapToInt(d -> d.getScore())
|
System.out.println("dictee voor ref: '" + referentie + "' tegen invoer: '" + invoer + "'");
|
||||||
.sum();
|
tuples.forEach(System.out::print);
|
||||||
|
System.out.println();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
package com.brainbaking.dictee;
|
|
||||||
|
|
||||||
public class Diff {
|
|
||||||
|
|
||||||
private final char aChar;
|
|
||||||
private final int refIndex;
|
|
||||||
private final int score;
|
|
||||||
|
|
||||||
public int getScore() {
|
|
||||||
return score;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Diff(char aChar, int index, int score) {
|
|
||||||
this.aChar = aChar;
|
|
||||||
this.refIndex = index;
|
|
||||||
this.score = score;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Diff create(char aChar) {
|
|
||||||
return create(aChar, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Diff hoofdletter(char aChar, int index) {
|
|
||||||
return new Diff(aChar, index, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Diff create(char aChar, int index) {
|
|
||||||
return new Diff(aChar, index, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return aChar + "@" + refIndex + "-" + score;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -19,6 +19,17 @@ public class DicteeTests {
|
||||||
assertEquals(expected, dictee.verbeter());
|
assertEquals(expected, dictee.verbeter());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ParameterizedTest
|
||||||
|
@ValueSource(strings = {
|
||||||
|
"sup dikke kerels|wup dikke kerel|4",
|
||||||
|
"sup dikke kerels|wup dikke kerels|2" })
|
||||||
|
public void combinatieGeval_zonderHoofdletters(String input) {
|
||||||
|
Dictee dictee = createDictee(input);
|
||||||
|
int expected = getExpected(input);
|
||||||
|
|
||||||
|
assertEquals(expected, dictee.verbeter());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void uitgebreidGeval() {
|
public void uitgebreidGeval() {
|
||||||
Dictee dictee = new Dictee("mogelike drangken zijn water cola fruitsap",
|
Dictee dictee = new Dictee("mogelike drangken zijn water cola fruitsap",
|
||||||
|
|
Loading…
Reference in New Issue