This commit is contained in:
InsanusMokrassar committed 2024-01-11 12:02:47 +00:00
1 parent 46d3ac4ce3
commit 042a9c17d3
3 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -2248,9 +2248,9 @@ navigation:</p>
</span><span id="__span-2-28"><a id="__codelineno-2-28" name="__codelineno-2-28" href="#__codelineno-2-28"></a> </span><span id="__span-2-28"><a id="__codelineno-2-28" name="__codelineno-2-28" href="#__codelineno-2-28"></a>
</span><span id="__span-2-29"><a id="__codelineno-2-29" name="__codelineno-2-29" href="#__codelineno-2-29"></a><span class="kd">object</span><span class="w"> </span><span class="nc">MainNodeFactory</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">NavigationNodeFactory</span><span class="o">&lt;</span><span class="n">NavigationNodeDefaultConfig</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span> </span><span id="__span-2-29"><a id="__codelineno-2-29" name="__codelineno-2-29" href="#__codelineno-2-29"></a><span class="kd">object</span><span class="w"> </span><span class="nc">MainNodeFactory</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="n">NavigationNodeFactory</span><span class="o">&lt;</span><span class="n">NavigationNodeDefaultConfig</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span>
</span><span id="__span-2-30"><a id="__codelineno-2-30" name="__codelineno-2-30" href="#__codelineno-2-30"></a><span class="w"> </span><span class="kd">override</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">createNode</span><span class="p">(</span> </span><span id="__span-2-30"><a id="__codelineno-2-30" name="__codelineno-2-30" href="#__codelineno-2-30"></a><span class="w"> </span><span class="kd">override</span><span class="w"> </span><span class="kd">fun</span><span class="w"> </span><span class="nf">createNode</span><span class="p">(</span>
</span><span id="__span-2-31"><a id="__codelineno-2-31" name="__codelineno-2-31" href="#__codelineno-2-31"></a><span class="w"> </span><span class="n">navigationChain</span><span class="p">:</span><span class="w"> </span><span class="n">NavigationChain</span><span class="o">&lt;</span><span class="n">Base</span><span class="o">&gt;</span><span class="p">,</span> </span><span id="__span-2-31"><a id="__codelineno-2-31" name="__codelineno-2-31" href="#__codelineno-2-31"></a><span class="w"> </span><span class="n">navigationChain</span><span class="p">:</span><span class="w"> </span><span class="n">NavigationChain</span><span class="o">&lt;</span><span class="n">NavigationNodeDefaultConfig</span><span class="o">&gt;</span><span class="p">,</span>
</span><span id="__span-2-32"><a id="__codelineno-2-32" name="__codelineno-2-32" href="#__codelineno-2-32"></a><span class="w"> </span><span class="n">config</span><span class="p">:</span><span class="w"> </span><span class="n">Base</span> </span><span id="__span-2-32"><a id="__codelineno-2-32" name="__codelineno-2-32" href="#__codelineno-2-32"></a><span class="w"> </span><span class="n">config</span><span class="p">:</span><span class="w"> </span><span class="n">NavigationNodeDefaultConfig</span>
</span><span id="__span-2-33"><a id="__codelineno-2-33" name="__codelineno-2-33" href="#__codelineno-2-33"></a><span class="w"> </span><span class="p">):</span><span class="w"> </span><span class="n">NavigationNode</span><span class="o">&lt;</span><span class="k">out</span><span class="w"> </span><span class="n">Base</span><span class="p">,</span><span class="w"> </span><span class="n">Base</span><span class="o">&gt;?</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">config</span><span class="w"> </span><span class="k">is</span><span class="w"> </span><span class="n">MainConfig</span><span class="p">)</span><span class="w"> </span><span class="p">{</span> </span><span id="__span-2-33"><a id="__codelineno-2-33" name="__codelineno-2-33" href="#__codelineno-2-33"></a><span class="w"> </span><span class="p">):</span><span class="w"> </span><span class="n">NavigationNode</span><span class="o">&lt;</span><span class="k">out</span><span class="w"> </span><span class="n">NavigationNodeDefaultConfig</span><span class="p">,</span><span class="w"> </span><span class="n">NavigationNodeDefaultConfig</span><span class="o">&gt;?</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="n">config</span><span class="w"> </span><span class="k">is</span><span class="w"> </span><span class="n">MainConfig</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
</span><span id="__span-2-34"><a id="__codelineno-2-34" name="__codelineno-2-34" href="#__codelineno-2-34"></a><span class="w"> </span><span class="n">MainNode</span><span class="p">(</span><span class="n">config</span><span class="p">,</span><span class="w"> </span><span class="n">navigationChain</span><span class="p">)</span><span class="w"> </span><span class="c1">// Or `MainNodeView(config, chain)` for MVVM</span> </span><span id="__span-2-34"><a id="__codelineno-2-34" name="__codelineno-2-34" href="#__codelineno-2-34"></a><span class="w"> </span><span class="n">MainNode</span><span class="p">(</span><span class="n">config</span><span class="p">,</span><span class="w"> </span><span class="n">navigationChain</span><span class="p">)</span><span class="w"> </span><span class="c1">// Or `MainNodeView(config, chain)` for MVVM</span>
</span><span id="__span-2-35"><a id="__codelineno-2-35" name="__codelineno-2-35" href="#__codelineno-2-35"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span> </span><span id="__span-2-35"><a id="__codelineno-2-35" name="__codelineno-2-35" href="#__codelineno-2-35"></a><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="k">else</span><span class="w"> </span><span class="p">{</span>
</span><span id="__span-2-36"><a id="__codelineno-2-36" name="__codelineno-2-36" href="#__codelineno-2-36"></a><span class="w"> </span><span class="kc">null</span> </span><span id="__span-2-36"><a id="__codelineno-2-36" name="__codelineno-2-36" href="#__codelineno-2-36"></a><span class="w"> </span><span class="kc">null</span>
+1 -1
View File
@@ -1 +1 @@
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Insanus Mokrassar libraries home","text":"<p>Hello :) It is my libraries docs place and I glad to welcome you here. I hope, this documentation place will help you.</p>"},{"location":"index.html#projects","title":"Projects","text":"Common and independent TelegramBotAPI Plagubot"},{"location":"index.html#dependencies-graph","title":"Dependencies graph:","text":"%%{init: {\"flowchart\": {\"defaultRenderer\": \"elk\"}} }%% flowchart TB KSLog[KSLog] MicroUtils[MicroUtils] TelegramBotAPI[TelegramBotAPI] TelegramBotAPI-examples[TelegramBotAPI-examples ] PlaguBot[PlaguBot] TelegramBotAPILibraries[TelegramBotAPILibraries] PlaguBotPlugins[PlaguBotPlugins] PlaguBotExample[PlaguBotExample] BooruGrabberTelegramBot[BooruGrabberTelegramBot] SauceNaoTelegramBot[SauceNaoTelegramBot] PlaguPoster[PlaguPoster] PlaguBotSuggestionsBot[PlaguBotSuggestionsBot] TelegramBotTutorial[TelegramBotTutorial] Krontab[Krontab] KJSUiKit[KJSUiKit] SauceNaoAPI[SauceNaoAPI] Navigation[Navigation] TelegramBotAPI-bot_template[TelegramBotAPI-bot_template] PlaguBotPluginTemplate[PlaguBotPluginTemplate] PlaguBotBotTemplate[PlaguBotBotTemplate] MicroUtils --&gt; KSLog TelegramBotAPI --&gt; MicroUtils TelegramBotAPI-examples --&gt; TelegramBotAPI PlaguBot --&gt; TelegramBotAPI TelegramBotAPILibraries --&gt; PlaguBot PlaguBotPlugins --&gt; TelegramBotAPILibraries PlaguBotExample --&gt; PlaguBotPlugins BooruGrabberTelegramBot --&gt; TelegramBotAPI BooruGrabberTelegramBot --&gt; Krontab SauceNaoTelegramBot --&gt; TelegramBotAPI SauceNaoTelegramBot --&gt; SauceNaoAPI TelegramBotTutorial --&gt; PlaguBotPlugins PlaguBotSuggestionsBot --&gt; PlaguBotPlugins PlaguPoster --&gt; PlaguBotPlugins PlaguPoster --&gt; Krontab SauceNaoAPI --&gt; MicroUtils Navigation --&gt; MicroUtils TelegramBotAPI-bot_template -.- TelegramBotAPI PlaguBotPluginTemplate -.- PlaguBot PlaguBotBotTemplate -.- PlaguBot"},{"location":"krontab/index.html","title":"krontab","text":"<p>Library was created to give oppotunity to launch some things from time to time according to some schedule in runtime of applications.</p>"},{"location":"krontab/index.html#how-to-use","title":"How to use","text":"<p>Here you may find the builder for <code>Krontab</code> templates creation.</p> <p>There are several ways to configure and use this library:</p> <ul> <li>From some string</li> <li>From builder</li> </ul> <p>Anyway, to start some action from time to time you will need to use one of extensions/functions:</p> <pre><code>val kronScheduler = /* creating of KronScheduler instance */;\n\nkronScheduler.doWhile {\n // some action\n true // true - repeat on next time\n}\n</code></pre>"},{"location":"krontab/index.html#including-in-project","title":"Including in project","text":"<p>If you want to include <code>krontab</code> in your project, just add next line to your dependencies part:</p> <pre><code>implementation \"dev.inmo:krontab:$krontab_version\"\n</code></pre> <p>Next version is the latest currently for the library:</p> <p></p> <p>For old version of Gradle, instead of <code>implementation</code> word developers must use <code>compile</code>.</p>"},{"location":"krontab/index.html#config-from-string","title":"Config from string","text":"<p>Developers can use more simple way to configure repeat times is string. String configuring like a <code>crontab</code>, but with a little bit different meanings:</p> <pre><code>/--------------- Seconds\n| /------------- Minutes\n| | /----------- Hours\n| | | /--------- Days of months\n| | | | /------- Months\n| | | | | /----- (optional) Year\n| | | | | | /--- (optional) Timezone offset\n| | | | | | | / (optional) Week days\n* * * * * * 0o *w\n</code></pre> <p>It is different with original <code>crontab</code> syntax for the reason, that expected that in practice developers will use seconds and minutes with more probability than months (for example) or even years. In fact, developers will use something like:</p> <pre><code>doWhile(\"/5 * * * *\") {\n println(\"Called\")\n true // true - repeat on next time\n}\n</code></pre> <p>An other version:</p> <pre><code>doInfinity(\"/5 * * * *\") {\n println(\"Called\")\n}\n</code></pre> <p>Both of examples will print <code>Called</code> message every five seconds.</p>"},{"location":"krontab/index.html#config-via-builder","title":"Config via builder","text":"<p>Also, this library currently supports DSL for creating the same goals:</p> <pre><code>val kronScheduler = buildSchedule {\n seconds {\n from (0) every 5\n }\n}\nkronScheduler.doWhile {\n println(\"Called\")\n true // true - repeat on next time\n}\n</code></pre> <p>Or</p> <pre><code>val kronScheduler = buildSchedule {\n seconds {\n 0 every 5\n }\nLine truncated {"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Insanus Mokrassar libraries home","text":"<p>Hello :) It is my libraries docs place and I glad to welcome you here. I hope, this documentation place will help you.</p>"},{"location":"index.html#projects","title":"Projects","text":"Common and independent TelegramBotAPI Plagubot"},{"location":"index.html#dependencies-graph","title":"Dependencies graph:","text":"%%{init: {\"flowchart\": {\"defaultRenderer\": \"elk\"}} }%% flowchart TB KSLog[KSLog] MicroUtils[MicroUtils] TelegramBotAPI[TelegramBotAPI] TelegramBotAPI-examples[TelegramBotAPI-examples ] PlaguBot[PlaguBot] TelegramBotAPILibraries[TelegramBotAPILibraries] PlaguBotPlugins[PlaguBotPlugins] PlaguBotExample[PlaguBotExample] BooruGrabberTelegramBot[BooruGrabberTelegramBot] SauceNaoTelegramBot[SauceNaoTelegramBot] PlaguPoster[PlaguPoster] PlaguBotSuggestionsBot[PlaguBotSuggestionsBot] TelegramBotTutorial[TelegramBotTutorial] Krontab[Krontab] KJSUiKit[KJSUiKit] SauceNaoAPI[SauceNaoAPI] Navigation[Navigation] TelegramBotAPI-bot_template[TelegramBotAPI-bot_template] PlaguBotPluginTemplate[PlaguBotPluginTemplate] PlaguBotBotTemplate[PlaguBotBotTemplate] MicroUtils --&gt; KSLog TelegramBotAPI --&gt; MicroUtils TelegramBotAPI-examples --&gt; TelegramBotAPI PlaguBot --&gt; TelegramBotAPI TelegramBotAPILibraries --&gt; PlaguBot PlaguBotPlugins --&gt; TelegramBotAPILibraries PlaguBotExample --&gt; PlaguBotPlugins BooruGrabberTelegramBot --&gt; TelegramBotAPI BooruGrabberTelegramBot --&gt; Krontab SauceNaoTelegramBot --&gt; TelegramBotAPI SauceNaoTelegramBot --&gt; SauceNaoAPI TelegramBotTutorial --&gt; PlaguBotPlugins PlaguBotSuggestionsBot --&gt; PlaguBotPlugins PlaguPoster --&gt; PlaguBotPlugins PlaguPoster --&gt; Krontab SauceNaoAPI --&gt; MicroUtils Navigation --&gt; MicroUtils TelegramBotAPI-bot_template -.- TelegramBotAPI PlaguBotPluginTemplate -.- PlaguBot PlaguBotBotTemplate -.- PlaguBot"},{"location":"krontab/index.html","title":"krontab","text":"<p>Library was created to give oppotunity to launch some things from time to time according to some schedule in runtime of applications.</p>"},{"location":"krontab/index.html#how-to-use","title":"How to use","text":"<p>Here you may find the builder for <code>Krontab</code> templates creation.</p> <p>There are several ways to configure and use this library:</p> <ul> <li>From some string</li> <li>From builder</li> </ul> <p>Anyway, to start some action from time to time you will need to use one of extensions/functions:</p> <pre><code>val kronScheduler = /* creating of KronScheduler instance */;\n\nkronScheduler.doWhile {\n // some action\n true // true - repeat on next time\n}\n</code></pre>"},{"location":"krontab/index.html#including-in-project","title":"Including in project","text":"<p>If you want to include <code>krontab</code> in your project, just add next line to your dependencies part:</p> <pre><code>implementation \"dev.inmo:krontab:$krontab_version\"\n</code></pre> <p>Next version is the latest currently for the library:</p> <p></p> <p>For old version of Gradle, instead of <code>implementation</code> word developers must use <code>compile</code>.</p>"},{"location":"krontab/index.html#config-from-string","title":"Config from string","text":"<p>Developers can use more simple way to configure repeat times is string. String configuring like a <code>crontab</code>, but with a little bit different meanings:</p> <pre><code>/--------------- Seconds\n| /------------- Minutes\n| | /----------- Hours\n| | | /--------- Days of months\n| | | | /------- Months\n| | | | | /----- (optional) Year\n| | | | | | /--- (optional) Timezone offset\n| | | | | | | / (optional) Week days\n* * * * * * 0o *w\n</code></pre> <p>It is different with original <code>crontab</code> syntax for the reason, that expected that in practice developers will use seconds and minutes with more probability than months (for example) or even years. In fact, developers will use something like:</p> <pre><code>doWhile(\"/5 * * * *\") {\n println(\"Called\")\n true // true - repeat on next time\n}\n</code></pre> <p>An other version:</p> <pre><code>doInfinity(\"/5 * * * *\") {\n println(\"Called\")\n}\n</code></pre> <p>Both of examples will print <code>Called</code> message every five seconds.</p>"},{"location":"krontab/index.html#config-via-builder","title":"Config via builder","text":"<p>Also, this library currently supports DSL for creating the same goals:</p> <pre><code>val kronScheduler = buildSchedule {\n seconds {\n from (0) every 5\n }\n}\nkronScheduler.doWhile {\n println(\"Called\")\n true // true - repeat on next time\n}\n</code></pre> <p>Or</p> <pre><code>val kronScheduler = buildSchedule {\n seconds {\n 0 every 5\n }\nLine truncated
BIN
View File
Binary file not shown.