From 42ebf4bb13b7a85ddb48e5893d5370af4babc4b7 Mon Sep 17 00:00:00 2001 From: esoe Date: Mon, 13 Mar 2023 11:43:36 +0300 Subject: [PATCH] qq --- java/samples/FileReaderAndWriter/Text.txt | 5 + java/samples/FileReaderAndWriter/build.xml | 73 + .../build/classes/.netbeans_automatic_build | 0 .../build/classes/.netbeans_update_resources | 0 .../FileReaderAndWriter.class | Bin 0 -> 2638 bytes java/samples/FileReaderAndWriter/manifest.mf | 3 + .../nbproject/build-impl.xml | 1420 +++++++++++++++++ .../nbproject/genfiles.properties | 8 + .../nbproject/private/private.properties | 2 + .../nbproject/project.properties | 74 + .../FileReaderAndWriter/nbproject/project.xml | 15 + .../FileReaderAndWriter.java | 60 + java/samples/PropertiesExample/build.xml | 73 + .../build/classes/.netbeans_automatic_build | 0 .../build/classes/.netbeans_update_resources | 0 .../propertiesexample/PropertiesExample.class | Bin 0 -> 1894 bytes java/samples/PropertiesExample/manifest.mf | 3 + .../nbproject/build-impl.xml | 1420 +++++++++++++++++ .../nbproject/genfiles.properties | 8 + .../nbproject/private/private.properties | 2 + .../nbproject/project.properties | 74 + .../PropertiesExample/nbproject/project.xml | 15 + .../samples/PropertiesExample/prop.properties | 3 + .../propertiesexample/PropertiesExample.java | 57 + java/samples/RulesPECS/build.xml | 73 + .../build/classes/.netbeans_automatic_build | 0 .../build/classes/.netbeans_update_resources | 0 .../build/classes/rulespecs/City.class | Bin 0 -> 258 bytes .../build/classes/rulespecs/Country.class | Bin 0 -> 266 bytes .../build/classes/rulespecs/District.class | Bin 0 -> 334 bytes .../build/classes/rulespecs/RulesPECS.class | Bin 0 -> 2145 bytes .../build/classes/rulespecs/Street.class | Bin 0 -> 265 bytes java/samples/RulesPECS/manifest.mf | 3 + .../RulesPECS/nbproject/build-impl.xml | 1420 +++++++++++++++++ .../RulesPECS/nbproject/genfiles.properties | 8 + .../nbproject/private/private.properties | 2 + .../RulesPECS/nbproject/project.properties | 74 + java/samples/RulesPECS/nbproject/project.xml | 15 + .../samples/RulesPECS/src/rulespecs/City.java | 14 + .../RulesPECS/src/rulespecs/Country.java | 14 + .../RulesPECS/src/rulespecs/District.java | 17 + .../RulesPECS/src/rulespecs/RulesPECS.java | 62 + .../RulesPECS/src/rulespecs/Street.java | 14 + 43 files changed, 5031 insertions(+) create mode 100644 java/samples/FileReaderAndWriter/Text.txt create mode 100644 java/samples/FileReaderAndWriter/build.xml create mode 100644 java/samples/FileReaderAndWriter/build/classes/.netbeans_automatic_build create mode 100644 java/samples/FileReaderAndWriter/build/classes/.netbeans_update_resources create mode 100644 java/samples/FileReaderAndWriter/build/classes/filereaderandwriter/FileReaderAndWriter.class create mode 100644 java/samples/FileReaderAndWriter/manifest.mf create mode 100644 java/samples/FileReaderAndWriter/nbproject/build-impl.xml create mode 100644 java/samples/FileReaderAndWriter/nbproject/genfiles.properties create mode 100644 java/samples/FileReaderAndWriter/nbproject/private/private.properties create mode 100644 java/samples/FileReaderAndWriter/nbproject/project.properties create mode 100644 java/samples/FileReaderAndWriter/nbproject/project.xml create mode 100644 java/samples/FileReaderAndWriter/src/filereaderandwriter/FileReaderAndWriter.java create mode 100644 java/samples/PropertiesExample/build.xml create mode 100644 java/samples/PropertiesExample/build/classes/.netbeans_automatic_build create mode 100644 java/samples/PropertiesExample/build/classes/.netbeans_update_resources create mode 100644 java/samples/PropertiesExample/build/classes/propertiesexample/PropertiesExample.class create mode 100644 java/samples/PropertiesExample/manifest.mf create mode 100644 java/samples/PropertiesExample/nbproject/build-impl.xml create mode 100644 java/samples/PropertiesExample/nbproject/genfiles.properties create mode 100644 java/samples/PropertiesExample/nbproject/private/private.properties create mode 100644 java/samples/PropertiesExample/nbproject/project.properties create mode 100644 java/samples/PropertiesExample/nbproject/project.xml create mode 100644 java/samples/PropertiesExample/prop.properties create mode 100644 java/samples/PropertiesExample/src/propertiesexample/PropertiesExample.java create mode 100644 java/samples/RulesPECS/build.xml create mode 100644 java/samples/RulesPECS/build/classes/.netbeans_automatic_build create mode 100644 java/samples/RulesPECS/build/classes/.netbeans_update_resources create mode 100644 java/samples/RulesPECS/build/classes/rulespecs/City.class create mode 100644 java/samples/RulesPECS/build/classes/rulespecs/Country.class create mode 100644 java/samples/RulesPECS/build/classes/rulespecs/District.class create mode 100644 java/samples/RulesPECS/build/classes/rulespecs/RulesPECS.class create mode 100644 java/samples/RulesPECS/build/classes/rulespecs/Street.class create mode 100644 java/samples/RulesPECS/manifest.mf create mode 100644 java/samples/RulesPECS/nbproject/build-impl.xml create mode 100644 java/samples/RulesPECS/nbproject/genfiles.properties create mode 100644 java/samples/RulesPECS/nbproject/private/private.properties create mode 100644 java/samples/RulesPECS/nbproject/project.properties create mode 100644 java/samples/RulesPECS/nbproject/project.xml create mode 100644 java/samples/RulesPECS/src/rulespecs/City.java create mode 100644 java/samples/RulesPECS/src/rulespecs/Country.java create mode 100644 java/samples/RulesPECS/src/rulespecs/District.java create mode 100644 java/samples/RulesPECS/src/rulespecs/RulesPECS.java create mode 100644 java/samples/RulesPECS/src/rulespecs/Street.java diff --git a/java/samples/FileReaderAndWriter/Text.txt b/java/samples/FileReaderAndWriter/Text.txt new file mode 100644 index 0000000..c43cf9e --- /dev/null +++ b/java/samples/FileReaderAndWriter/Text.txt @@ -0,0 +1,5 @@ +Hello world!Hello world! +Hello world! +Hello world! +Hello world! +Hello world! \ No newline at end of file diff --git a/java/samples/FileReaderAndWriter/build.xml b/java/samples/FileReaderAndWriter/build.xml new file mode 100644 index 0000000..803ce41 --- /dev/null +++ b/java/samples/FileReaderAndWriter/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project FileReaderAndWriter. + + + diff --git a/java/samples/FileReaderAndWriter/build/classes/.netbeans_automatic_build b/java/samples/FileReaderAndWriter/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/java/samples/FileReaderAndWriter/build/classes/.netbeans_update_resources b/java/samples/FileReaderAndWriter/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/java/samples/FileReaderAndWriter/build/classes/filereaderandwriter/FileReaderAndWriter.class b/java/samples/FileReaderAndWriter/build/classes/filereaderandwriter/FileReaderAndWriter.class new file mode 100644 index 0000000000000000000000000000000000000000..fdd40992f97f3e2096dcf4d3052b30a9ec066c29 GIT binary patch literal 2638 zcma)8-EUK69Dd$*?b{yC*x1HcVK4?vHbyr=Hs*%tC_|?EKsGna6g+FswvMy5w5Qup z#7{)g3oc9y-gvphL=uSU)ET&v5HCzj@PfpDz&}AQoX^`+O8230$=>(8zpv-{eZ1%N zm%o3!1KXmH_#T3%GkNr_&Gmo&VLJ`MdC@M93C)YB_UecFd1iD3<8 zcvWIV!zP4$7*+dgY6&aN8MTZ_ysn`JZz#93KAe+yQ$sBbwTw$dG}Ixg4r6|pn9wkZ zDT$bX_ed-rvyTe68=FQ1NZo!RP-exhBacOV(Oe1me^CV zv_MneM9eZ%rV%w$Mm#!~irHqW^#o<7bF%JubTlXHBEXChiwjgYj`d9&vqr0B#3x&a z>{Kj1*`)}$%z1&$jxLsH?H%lykC;h2mWb2Y>x34lDi|n~C&4Y!R$SMFW`5(D35FjF z35W>)dl}B5ygHmiT5&Z}lT5F29ja8SoCP+nU_z(TA=`+Y?>CaU8cB3Xvy)NNQP$Cbrv&sIeP-{N`-aVVyTzWjm3msod00ATV3FBl!=f??>{ZPEM>izm zIub}qT+oq1T7n1}%<7oKypD?sK|g6)R$}K|B4tJES=q;cikVY(Md~eqEjdk5H;-jv z7UzML)^xm$OFG^`QaxSP@vh3!A)oUYo=PR=)LiL!5AW;vKtW>_oYNKs_o0rDa7Cbe zHKtO2EOAxGC-_w2nvTyfy~1vAeA>r|;wEmh}iZ@z(L> zoH+$wsWWFy7S21=GtzUqMyGLYbS>!eRjfmH3;l0b`4D#sUh=1#*9bIu6)&rSa=V3B32^J zmXsRN=ujq^OquDlN&K4PAS-i_%t1|bB#0;2JMphj4@bP1z{#=}Yz74qU<*AiBuLL~% z79nos)Qw!dIbkK5_^dky*oS7G{Me5mC3JTGKs$~1X>JLwaD{sjC4J3Vc)mg{H}B{I zs`@K@S@^$)b{iYS{w#DVN^jtL#m4?6l!cp17EwMRI!l5}*c4twMMY&6RkW+hVsjSN zqrrPP6)3rf>R=XI7I3`N6DSFIvIs1o!x0^z$kR#T-A*s9>x!%^J0-1U&RQz#fcGvr z4HR>tSaI5V1K(9_Bd6MM^CGq@O1_^wogR0)H>mJ-gxkHYudydjQ!!jZT{z%zZ}u)? zr$e}ZVfpuB!u4wjQ&dFQS4^0y%1%EC`wN8Y1HN?$-^MO7*nJD7{8(2b0Eux-AjS`M zH^R7-->6Z~lf@qLXdvotqBan7FHswClXG{6 zWArnJ=sw5j0q5@_p2i>a{1XR-#!p%hK_a(_F&rjxn>dGdkwAx-MQ3gtlh{DKa + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/samples/FileReaderAndWriter/nbproject/genfiles.properties b/java/samples/FileReaderAndWriter/nbproject/genfiles.properties new file mode 100644 index 0000000..a87e5f8 --- /dev/null +++ b/java/samples/FileReaderAndWriter/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=64ca7b4c +build.xml.script.CRC32=2cd2026b +build.xml.stylesheet.CRC32=8064a381@1.80.1.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=64ca7b4c +nbproject/build-impl.xml.script.CRC32=38645af4 +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/java/samples/FileReaderAndWriter/nbproject/private/private.properties b/java/samples/FileReaderAndWriter/nbproject/private/private.properties new file mode 100644 index 0000000..11ff3b8 --- /dev/null +++ b/java/samples/FileReaderAndWriter/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\denis.LAPTOP-4LI8UQ4O\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/java/samples/FileReaderAndWriter/nbproject/project.properties b/java/samples/FileReaderAndWriter/nbproject/project.properties new file mode 100644 index 0000000..abdbcc9 --- /dev/null +++ b/java/samples/FileReaderAndWriter/nbproject/project.properties @@ -0,0 +1,74 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# \u0424\u0430\u0439\u043b\u044b \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 build.classes.dir, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0437 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430 jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/FileReaderAndWriter.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=filereaderandwriter.FileReaderAndWriter +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/java/samples/FileReaderAndWriter/nbproject/project.xml b/java/samples/FileReaderAndWriter/nbproject/project.xml new file mode 100644 index 0000000..db9f317 --- /dev/null +++ b/java/samples/FileReaderAndWriter/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + FileReaderAndWriter + + + + + + + + + diff --git a/java/samples/FileReaderAndWriter/src/filereaderandwriter/FileReaderAndWriter.java b/java/samples/FileReaderAndWriter/src/filereaderandwriter/FileReaderAndWriter.java new file mode 100644 index 0000000..654622e --- /dev/null +++ b/java/samples/FileReaderAndWriter/src/filereaderandwriter/FileReaderAndWriter.java @@ -0,0 +1,60 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package filereaderandwriter; + +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author denis + */ +public class FileReaderAndWriter { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + File file = new File("Text.txt"); + if(!file.exists()) try { + file.createNewFile(); + } catch (IOException ex) { + Logger.getLogger(FileReaderAndWriter.class.getName()).log(Level.SEVERE, null, ex); + } + + if(file.canWrite()){ + + String line = "Hello world!"; + try (FileWriter writer = new FileWriter(file, true)) { + writer.append("\n" + line); + } catch (IOException ex) { + Logger.getLogger(FileReaderAndWriter.class.getName()).log(Level.SEVERE, null, ex); + } + + } + + if(file.canRead()){ + String line = ""; + try(FileReader reader = new FileReader(file)){ + + char[]buf = new char[5]; + int c =0; + while((c=reader.read(buf))!=-1){ + line += new String(buf, 0, c); + } + + }catch (IOException ex) { + Logger.getLogger(FileReaderAndWriter.class.getName()).log(Level.SEVERE, null, ex); + } + System.out.println(line); + } + } + +} diff --git a/java/samples/PropertiesExample/build.xml b/java/samples/PropertiesExample/build.xml new file mode 100644 index 0000000..2755765 --- /dev/null +++ b/java/samples/PropertiesExample/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project PropertiesExample. + + + diff --git a/java/samples/PropertiesExample/build/classes/.netbeans_automatic_build b/java/samples/PropertiesExample/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/java/samples/PropertiesExample/build/classes/.netbeans_update_resources b/java/samples/PropertiesExample/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/java/samples/PropertiesExample/build/classes/propertiesexample/PropertiesExample.class b/java/samples/PropertiesExample/build/classes/propertiesexample/PropertiesExample.class new file mode 100644 index 0000000000000000000000000000000000000000..b724eb37d675abbeb6050190f1182ae3f8e33844 GIT binary patch literal 1894 zcmZ`)O;;0F7=CUNm@p0k;X^>Jv=&VSiAAlpSX!Z>T0)=%L($rH2$wK8$>dB1g{9}T zyKdV>7u~wnMd&H#^au1u)joG7n1Q6pIrq+e?)yIP_sl>4{`EJ2TX?49Jf=0=jN_J$ z2yUz8W3}ATa96`8IzGjWj(hm53$yrKJ$<3!zK(9CHm9Qp^Xl-WhD;Y0@KqcS;&`Z_ zuXQXUt6@pUa3GY^uq@Dd&#GA7tUxrGDhR~poh>QQleH=`w^!bj?wYx26G>#9qG=aQ z*HY&O81r_ln!tFr>N-{FdX}uoeY0G(WqRcuk_nI*l9x@ZA~2MElHE0*n`zsul+t<6 zwJN0Uu)w7%ml`p-+7c5)m9B;wdt89fOVy0W7H~nqc1>)P( zQcek+J;6k3z3D!^3vTy3%MJxWsqVaI7N0GdRX=zQDJtfjJ+~;8LsV=Dc}hiT-~uiR z7=FZzDiH2bCa0QqmDGxXZ?I}0k5xu-EFa2(z~!dK|0Y_)nt?|sXjnJ!EjBbfHt+=B z8F-5C1qOWLQ{l0`$M%$etJ2((uJY*z13$tPxEQ`}Nxp_n14V2JbX3f;TomYClm}y0 zZLH#WV{+fBc?Kl5HIxkOVC9s#b=UHgISaeg^ey?VvAnq}iym7d8Pw!-zjXS{EIE7k zF$+|5rRm9>e9_2plWE>IYn0PU(#z37W+9ns|tF9wni`e8cKV_k5AoSVG9!j_bToQ|k{| zUxTI5iar*z9h1fDZ(ao*;9rIcl0T?hM8*2!hyiu zHn|EpcRc>BP-q51{48QsS+n^f>8N>*%VLf<{SI1brj;#K!25{v{i=Qu2sM>l-{UFG zU2yNXb_ns>zrMt^(+3AJ#%CiCAjJnfb>T8TBtm8J2V(pKza1g6k%%55mYt}h<9A%( z*17%)151f`9bJDye}gk(vJT@2-5ZBEyEJ)(o{fn^^w!b$3dvkp?mFeD+k(A8|72ny zF<8e?9p}g}tQbZ_9i#2UU(>ff3}FNsruoUZkA%NJ;@QJX{KP#9740epxSog3#Pl&W zLyUWb5svcq8l#?O#Is0|VH|U~LirS5GFMSR65C9nM~RoXO~#w}ncuQsamUZx16mkG zFSV{P?Q{OqRoW~xuqdU2+o;MS*;3qf{6eb}%<(j~Fp2Bbog#h%+FQC6(U8_u6*XwR aZ|Q3^05pE+h$Zq0f2tNT+@M|rAN>c_!O{u< literal 0 HcmV?d00001 diff --git a/java/samples/PropertiesExample/manifest.mf b/java/samples/PropertiesExample/manifest.mf new file mode 100644 index 0000000..1574df4 --- /dev/null +++ b/java/samples/PropertiesExample/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/java/samples/PropertiesExample/nbproject/build-impl.xml b/java/samples/PropertiesExample/nbproject/build-impl.xml new file mode 100644 index 0000000..53273d4 --- /dev/null +++ b/java/samples/PropertiesExample/nbproject/build-impl.xml @@ -0,0 +1,1420 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/samples/PropertiesExample/nbproject/genfiles.properties b/java/samples/PropertiesExample/nbproject/genfiles.properties new file mode 100644 index 0000000..a66821c --- /dev/null +++ b/java/samples/PropertiesExample/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=114678dd +build.xml.script.CRC32=5efee7cf +build.xml.stylesheet.CRC32=8064a381@1.80.1.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=114678dd +nbproject/build-impl.xml.script.CRC32=6b3fab86 +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/java/samples/PropertiesExample/nbproject/private/private.properties b/java/samples/PropertiesExample/nbproject/private/private.properties new file mode 100644 index 0000000..11ff3b8 --- /dev/null +++ b/java/samples/PropertiesExample/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\denis.LAPTOP-4LI8UQ4O\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/java/samples/PropertiesExample/nbproject/project.properties b/java/samples/PropertiesExample/nbproject/project.properties new file mode 100644 index 0000000..e3fea1a --- /dev/null +++ b/java/samples/PropertiesExample/nbproject/project.properties @@ -0,0 +1,74 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# \u0424\u0430\u0439\u043b\u044b \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 build.classes.dir, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0437 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430 jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/PropertiesExample.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=propertiesexample.PropertiesExample +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/java/samples/PropertiesExample/nbproject/project.xml b/java/samples/PropertiesExample/nbproject/project.xml new file mode 100644 index 0000000..81b1bb1 --- /dev/null +++ b/java/samples/PropertiesExample/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + PropertiesExample + + + + + + + + + diff --git a/java/samples/PropertiesExample/prop.properties b/java/samples/PropertiesExample/prop.properties new file mode 100644 index 0000000..3c27726 --- /dev/null +++ b/java/samples/PropertiesExample/prop.properties @@ -0,0 +1,3 @@ +#Wed Nov 23 21:13:48 MSK 2022 +nameK=Hello world +key=key value2 diff --git a/java/samples/PropertiesExample/src/propertiesexample/PropertiesExample.java b/java/samples/PropertiesExample/src/propertiesexample/PropertiesExample.java new file mode 100644 index 0000000..d35140f --- /dev/null +++ b/java/samples/PropertiesExample/src/propertiesexample/PropertiesExample.java @@ -0,0 +1,57 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package propertiesexample; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.util.Properties; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author denis + */ +public class PropertiesExample { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + File fileProp = new File("prop.properties"); + if(!fileProp.exists()) try { + fileProp.createNewFile(); + } catch (IOException ex) { + Logger.getLogger(PropertiesExample.class.getName()).log(Level.SEVERE, null, ex); + } + + Properties properties = new Properties(); + try { + properties.load(new FileReader(fileProp)); + } catch (FileNotFoundException ex) { + Logger.getLogger(PropertiesExample.class.getName()).log(Level.SEVERE, null, ex); + } catch (IOException ex) { + Logger.getLogger(PropertiesExample.class.getName()).log(Level.SEVERE, null, ex); + } + +// properties.put("key", "key value"); +// properties.put("key", "key value2"); +// properties.put("key2", "key value2"); + + System.out.println(properties.getProperty("nameK", "Key is not exist")); + + try { + properties.store(new FileWriter(fileProp), null); + } catch (IOException ex) { + Logger.getLogger(PropertiesExample.class.getName()).log(Level.SEVERE, null, ex); + } + + } + +} diff --git a/java/samples/RulesPECS/build.xml b/java/samples/RulesPECS/build.xml new file mode 100644 index 0000000..1f2dc1c --- /dev/null +++ b/java/samples/RulesPECS/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project RulesPECS. + + + diff --git a/java/samples/RulesPECS/build/classes/.netbeans_automatic_build b/java/samples/RulesPECS/build/classes/.netbeans_automatic_build new file mode 100644 index 0000000..e69de29 diff --git a/java/samples/RulesPECS/build/classes/.netbeans_update_resources b/java/samples/RulesPECS/build/classes/.netbeans_update_resources new file mode 100644 index 0000000..e69de29 diff --git a/java/samples/RulesPECS/build/classes/rulespecs/City.class b/java/samples/RulesPECS/build/classes/rulespecs/City.class new file mode 100644 index 0000000000000000000000000000000000000000..d0e229d81c942e0f1abbb1d26a69f4810d2dcddc GIT binary patch literal 258 zcmY+8Jqp4=5QX2w{Ai57H?UI+ZR`{q!7A7&_G?^lB_^^-1dnAUSa<*rCC&y5oq;#= zKIXx^-j64M3EDm?Xn1IPXc63*N>n~4RQiK0!Cs_$Noa*Ck*ngglX@d|F_UhXMk3w{ zt&IOdJ3pw5&<=GG%j_(pY`jqUbxQEpX`v&zR3=+9aC8(G5x|B+X#U?5IzJ#Sl3ZWW qgT;TEB5sbcy6ncK2b|#@bYoz_V|5t=0ji~%-9ZgLPePs5Lhu3XOEat3<)9zJ6cujOy%H~_w)i~lu6+#F=}*u^&wxbH{M9|H?MtH&4!@pMzOyXYa{NqA<1mhe;`GIsC5^3m&XpE>V8lvwj#K3wb6u8!lk}%inTUNwa$f^ zBvq>Nl``DoZ_>3H*MwOwpq0iLHJNLCe?S`CJlZhmyhaM zMR4Is{Qm^P@Ry9)zF-DNUT@2Ryb4dcFK8~4WP0aspx5pkNcTH3LSOdiOMoMUf(XZZ U^F@b+`)eE@7-?^eMDAd)18>ngsQ>@~ literal 0 HcmV?d00001 diff --git a/java/samples/RulesPECS/build/classes/rulespecs/RulesPECS.class b/java/samples/RulesPECS/build/classes/rulespecs/RulesPECS.class new file mode 100644 index 0000000000000000000000000000000000000000..0f074ad58e47049049eb3da9b14e88be75372a21 GIT binary patch literal 2145 zcmb7EYjfK~6g~1&mL11UNzw!;YH3sFWdluHNYa#$2Q78d5H~4lp`ggZsMwN6mKpL> z_!;nlOz{j1!?*sX4#Qck{7RF|@I||O_Uygqp1s;v|NikOfCU&DCUGx`Pc=luxT+y0 z#?Le)a4(HDtS7OdAtk^~4QVlcu3<=w_f3s#UHMe3Z7%th4wcV;8THa&hutsF0WPuW%w z4`M1%O}FLv-Vup88K&jiwPML``b-fwZC`AqDqMTE>2sds%(BF6Y*6%3qa*zKiAc+R z6|Bj8ODhb2^*kOk2c)TUNb8}jfOzd3B5k4OfTlJ)x6(2#kJjW*9Fe}&7*)ZI6MM_E zeN_x3PL=JdWB4tP7ddk>@I2SC+*VU>9@TZ9{ko`k!xwftzgD5sAfn&{1*`uvq>xt-P85U* z1*1~Q;3=LZ@pT5@;5l89x2oGsz3a-i8GI*_W&8G|D?Omkl^)n}CD(IBZZcNyPULk& zsfF)J*rLIEA-PM_Pfy?s+j&Q#Rf|_Sntw2TT4VO*Egv;~tIoI1ZHWVtZM(%ChVq3@ zqs~s2oiYgXRcQ!P&A}DE$di1e!53K(9mnsxTopMg9OE;`P=4hkg3J6S0&p1bah{O` z=nMkB-B!k3z*ba=1in0#ht=fd$@Wi6yGsBU+($ zQOSx_i)*;fm5T4lzQS5^c#a#$v-T<6$24bAp8pUtoW&Sn0<)aOF~?IgL?nN{%P(~K z#V-E?@)gGTh%90B4mlByS{tlmWS|b|_FSNGOtM0^$;VCRR)XB}CIqrT7D1J4ht%P0q~u zCTDUU&)Xfq7@?0ES{~XSIt=bq=2FiXYW+dNV9$%4VCbx5F4om?E7XQ>Ga}tpk@76z zN*e!#w%*Iqys0V^Mv6l*1fo-p`vQK?icrAaqGcy!=r9>9jf5dLTApC4MtQY)Ei r^k7k4GmMs!q%OJW?Ez + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/samples/RulesPECS/nbproject/genfiles.properties b/java/samples/RulesPECS/nbproject/genfiles.properties new file mode 100644 index 0000000..ebce509 --- /dev/null +++ b/java/samples/RulesPECS/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=f1c33432 +build.xml.script.CRC32=9cbcce91 +build.xml.stylesheet.CRC32=8064a381@1.80.1.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=f1c33432 +nbproject/build-impl.xml.script.CRC32=01d0e4a4 +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/java/samples/RulesPECS/nbproject/private/private.properties b/java/samples/RulesPECS/nbproject/private/private.properties new file mode 100644 index 0000000..11ff3b8 --- /dev/null +++ b/java/samples/RulesPECS/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\denis.LAPTOP-4LI8UQ4O\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/java/samples/RulesPECS/nbproject/project.properties b/java/samples/RulesPECS/nbproject/project.properties new file mode 100644 index 0000000..c5f6daf --- /dev/null +++ b/java/samples/RulesPECS/nbproject/project.properties @@ -0,0 +1,74 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# \u0424\u0430\u0439\u043b\u044b \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 build.classes.dir, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0437 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430 jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/RulesPECS.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=rulespecs.RulesPECS +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/java/samples/RulesPECS/nbproject/project.xml b/java/samples/RulesPECS/nbproject/project.xml new file mode 100644 index 0000000..65e52b8 --- /dev/null +++ b/java/samples/RulesPECS/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + RulesPECS + + + + + + + + + diff --git a/java/samples/RulesPECS/src/rulespecs/City.java b/java/samples/RulesPECS/src/rulespecs/City.java new file mode 100644 index 0000000..ed78e8b --- /dev/null +++ b/java/samples/RulesPECS/src/rulespecs/City.java @@ -0,0 +1,14 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package rulespecs; + +/** + * + * @author denis + */ +public class City extends Country{ + +} diff --git a/java/samples/RulesPECS/src/rulespecs/Country.java b/java/samples/RulesPECS/src/rulespecs/Country.java new file mode 100644 index 0000000..49421e1 --- /dev/null +++ b/java/samples/RulesPECS/src/rulespecs/Country.java @@ -0,0 +1,14 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package rulespecs; + +/** + * + * @author denis + */ +public class Country { + +} diff --git a/java/samples/RulesPECS/src/rulespecs/District.java b/java/samples/RulesPECS/src/rulespecs/District.java new file mode 100644 index 0000000..a82bf62 --- /dev/null +++ b/java/samples/RulesPECS/src/rulespecs/District.java @@ -0,0 +1,17 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package rulespecs; + +/** + * + * @author denis + */ +public class District extends City{ + + public void methods(){ + + } +} diff --git a/java/samples/RulesPECS/src/rulespecs/RulesPECS.java b/java/samples/RulesPECS/src/rulespecs/RulesPECS.java new file mode 100644 index 0000000..cfeaca7 --- /dev/null +++ b/java/samples/RulesPECS/src/rulespecs/RulesPECS.java @@ -0,0 +1,62 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package rulespecs; + +import java.util.ArrayList; +import java.util.List; + +/** + * + * @author denis + */ +public class RulesPECS { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + RulesPECS rules = new RulesPECS(); + + List countrys = new ArrayList<>(); + countrys.add(new Country()); + List citys = new ArrayList<>(); + citys.add(new City()); + List districts = new ArrayList<>(); + districts.add(new District()); + List streets = new ArrayList<>(); + streets.add(new Street()); + + rules.producer(countrys); + rules.producer(citys); + rules.producer(districts); + rules.producer(streets); + + rules.consumer(countrys); + rules.consumer(citys); + rules.consumer(districts); + rules.consumer(streets); + } + + public void producer (List list){ + list.add(new Country()); + list.add(new City()); + list.add(new District()); + list.add(new Street()); + } + + public void consumer (List list){ + Object district = list.get(0); + if(district instanceof Country) System.out.println("Object is Country"); + if(district instanceof City) System.out.println("Object is City"); + if(district instanceof District) System.out.println("Object is District"); + if(district instanceof Street) System.out.println("Object is Street"); + list.add(new Country()); + list.add(new City()); + list.add(new District()); + list.add(new Street()); + } + +} diff --git a/java/samples/RulesPECS/src/rulespecs/Street.java b/java/samples/RulesPECS/src/rulespecs/Street.java new file mode 100644 index 0000000..53a068e --- /dev/null +++ b/java/samples/RulesPECS/src/rulespecs/Street.java @@ -0,0 +1,14 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package rulespecs; + +/** + * + * @author denis + */ +public class Street extends District{ + +}