From c3973f2ade85ab9daea3435d22656097dd300602 Mon Sep 17 00:00:00 2001 From: Leonard Kugis Date: Mon, 25 Apr 2022 18:04:14 +0200 Subject: Initial commit --- .classpath | 6 + .gitignore | 171 +++++++++++++++++++++ .project | 17 +++ src/com/encrox/automaten/Core.java | 262 +++++++++++++++++++++++++++++++++ src/com/encrox/automaten/Schlange.java | 56 +++++++ src/com/encrox/automaten/Stapel.java | 54 +++++++ 6 files changed, 566 insertions(+) create mode 100755 .classpath create mode 100644 .gitignore create mode 100755 .project create mode 100755 src/com/encrox/automaten/Core.java create mode 100755 src/com/encrox/automaten/Schlange.java create mode 100755 src/com/encrox/automaten/Stapel.java diff --git a/.classpath b/.classpath new file mode 100755 index 0000000..d171cd4 --- /dev/null +++ b/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9d02df8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,171 @@ + +# Created by https://www.toptal.com/developers/gitignore/api/eclipse,java,windows,linux,macos +# Edit at https://www.toptal.com/developers/gitignore?templates=eclipse,java,windows,linux,macos + +### Eclipse ### +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# CDT- autotools +.autotools + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + +# Annotation Processing +.apt_generated/ +.apt_generated_test/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet + +# Uncomment this line if you wish to ignore the project description file. +# Typically, this file would be tracked if it contains build/dependency configurations: +#.project + +### Eclipse Patch ### +# Spring Boot Tooling +.sts4-cache/ + +### Java ### +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +replay_pid* + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/eclipse,java,windows,linux,macos diff --git a/.project b/.project new file mode 100755 index 0000000..e4b0df8 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + Automaten + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/src/com/encrox/automaten/Core.java b/src/com/encrox/automaten/Core.java new file mode 100755 index 0000000..3ec994f --- /dev/null +++ b/src/com/encrox/automaten/Core.java @@ -0,0 +1,262 @@ +package com.encrox.automaten; + +public class Core { + + public static void main(String args[]) { + System.out.println(isOkNormal("z")); + System.out.println(isOk("z")); + } + + public static boolean isOkNormal(String str) { + boolean out = false; + char current; + Schlange schlange = new Schlange(); + for(int i = 0, len = str.length(); i