Software developer. Coding and gaming passionate.
Beauty in simple things.
Art in their composition.
-
Red Hat
- Seville, Spain
Pinned Loading
-
Calculator done with enums for the o...
Calculator done with enums for the operation 1public class EnumCalculator {
23//Notice how concise the code has become in the logic
45public int calculate(char op, int a, int b) {
-
Third example for "Rethinking interf...
Third example for "Rethinking interfaces". Now making totally equivalent our "interface class" to implement our interface. 1class OperationInterfaceAsClass implements Operation {
23Predicate<String> isOperation;
4Function<List<Integer>, Integer> operate;
5 -
How would you create classic instanc...
How would you create classic instances using this aproach, creating a factory. "Rethinking interfaces" 1class OperationWithOperationData {
23Predicate<String> isOperation;
4IntBinaryOperator reductionOperation;
5List<Integer> toOperateOn;
-
Creating Data classes interfaces. Re...
Creating Data classes interfaces. Rethinking interfaces in medium 1class CharacterData {
2int HP;
3int attack;
4int defense;
5 -
Transforming it to an abstract appro...
Transforming it to an abstract approach instead of interface approach (having some part of the code already implemented). 1class OperationAbstractAsClass implements Operation {
23Predicate<String> isOperation;
4IntBinaryOperator reductionOperation;
5 -
Toy compresser
Toy compresser 1package com.company;
23import java.util.*;
4import java.util.stream.Collectors;
5import java.util.stream.IntStream;
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.