-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed the double foldering and started some seriouse work.
- Loading branch information
Showing
30 changed files
with
131 additions
and
76 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
Primitive-Collections/src/main/resources/speiger/assets/collections/cache.bin
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
Primitive-Collections/src/main/resources/speiger/assets/collections/templates/List.template
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
44 changes: 44 additions & 0 deletions
44
src/main/java/speiger/src/builder/example/GlobalVariables.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package speiger.src.builder.example; | ||
|
||
import java.util.ArrayList; | ||
import java.util.LinkedHashSet; | ||
import java.util.List; | ||
import java.util.Set; | ||
import java.util.function.UnaryOperator; | ||
|
||
import speiger.src.builder.mappers.SimpleMapper; | ||
import speiger.src.builder.processor.TemplateProcess; | ||
|
||
public class GlobalVariables | ||
{ | ||
String fileName; | ||
String folderName; | ||
List<UnaryOperator<String>> operators = new ArrayList<>(); | ||
Set<String> flags = new LinkedHashSet<>(); | ||
|
||
public GlobalVariables(String fileName, String folderName) | ||
{ | ||
this.fileName = fileName; | ||
this.folderName = folderName; | ||
} | ||
|
||
public GlobalVariables createInitials(String classType, String keyType) | ||
{ | ||
operators.add(new SimpleMapper("CLASS_TYPE", classType)); | ||
operators.add(new SimpleMapper("KEY_TYPE", keyType)); | ||
return this; | ||
} | ||
|
||
public GlobalVariables createClassTypes(String fileType) | ||
{ | ||
operators.add(new SimpleMapper("CONSUMER", fileType+"Consumer")); | ||
return this; | ||
} | ||
|
||
public TemplateProcess create(String fileName) | ||
{ | ||
|
||
// TemplateProcess process = new TemplateProcess(entry.getKey()+name+".java", Paths.get("")); | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
List=8346cdbb0624aa07f1c54d00f765cbd5 | ||
Consumer=e0112061d850a9ea6049cfe6571e2750 |
22 changes: 22 additions & 0 deletions
22
src/main/resources/speiger/assets/collections/templates/functions/Consumer.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package speiger.src.collections.example.functions; | ||
|
||
import java.util.Objects; | ||
import java.util.function.Consumer; | ||
|
||
public interface CONSUMER extends Consumer<CLASS_TYPE>, JAVA_CONSUMER | ||
{ | ||
void accept(KEY_TYPE t); | ||
|
||
default void accept(CLASS_TYPE t) { accept(OBJ_TO_KEY(t)); } | ||
|
||
@Override | ||
default CONSUMER andThen(Consumer<? super CLASS_TYPE> after) { | ||
Objects.requireNonNull(after); | ||
return T -> {accept(T); after.accept(T);}; | ||
} | ||
|
||
default CONSUMER andThen(CONSUMER after) { | ||
Objects.requireNonNull(after); | ||
return T -> {accept(T); after.accept(T);}; | ||
} | ||
} |