src/main/java/de/financial_lighthouse/demo/ExampleData.java
public static FamilyTree family() {
        var members = Map.of(
            "client", new ClientF("Max Mustermann")
                .setIsMarried(true)
                .setBirthDay(LocalDateTime.of(1970, 1, 1, 0, 0, 0))
                .setGender(Gender.Female),
            "spouse", new Partner("Hilde Mustermann")
                .setGender(Gender.Female),
            "son", new Child("Hans Mustermann")
                .setGender(Gender.Male),
            "daughter", new Child("Sophie Mustermann")
                .setGender(Gender.Female)
        );

        return new FamilyTree()
            .setMembers(new ArrayList<>(members.values()))
            .setRelationships(List.of(
                members.get("spouse").isPartnerOf(members.get("client")),
                members.get("son").isChildOf(members.get("client")),
                members.get("son").isChildOf(members.get("spouse")),
                members.get("daughter").isChildOf(members.get("client")),
                members.get("daughter").isChildOf(members.get("spouse"))
            ));
    }
/**
     * Beispielhafte Familie: Vater, Mutter, zwei Kinder
     */
Beispielhafte Familie: Vater, Mutter, zwei Kinder
Beispielhafte Familie : Vater Mutter zwei Kinder
public static FamilyTree family() {
        var members = Map.of(
            "client", new ClientF("Max Mustermann")
                .setIsMarried(true)
                .setBirthDay(LocalDateTime.of(1970, 1, 1, 0, 0, 0))
                .setGender(Gender.Female),
            "spouse", new Partner("Hilde Mustermann")
                .setGender(Gender.Female),
            "son", new Child("Hans Mustermann")
                .setGender(Gender.Male),
            "daughter", new Child("Sophie Mustermann")
                .setGender(Gender.Female)
        );
        return new FamilyTree()
            .setMembers(new ArrayList<>(members.values()))
            .setRelationships(List.of(
                members.get("spouse").isPartnerOf(members.get("client")),
                members.get("son").isChildOf(members.get("client")),
                members.get("son").isChildOf(members.get("spouse")),
                members.get("daughter").isChildOf(members.get("client")),
                members.get("daughter").isChildOf(members.get("spouse"))
            ));
    }
public static FamilyTree family ( ) { var members = Map . of ( "client" , new ClientF ( "Max Mustermann" ) . setIsMarried ( true ) . setBirthDay ( LocalDateTime . of ( 1970 , 1 , 1 , 0 , 0 , 0 ) ) . setGender ( Gender . Female ) , "spouse" , new Partner ( "Hilde Mustermann" ) . setGender ( Gender . Female ) , "son" , new Child ( "Hans Mustermann" ) . setGender ( Gender . Male ) , "daughter" , new Child ( "Sophie Mustermann" ) . setGender ( Gender . Female ) ) ; return new FamilyTree ( ) . setMembers ( new ArrayList < > ( members . values ( ) ) ) . setRelationships ( List . of ( members . get ( "spouse" ) . isPartnerOf ( members . get ( "client" ) ) , members . get ( "son" ) . isChildOf ( members . get ( "client" ) ) , members . get ( "son" ) . isChildOf ( members . get ( "spouse" ) ) , members . get ( "daughter" ) . isChildOf ( members . get ( "client" ) ) , members . get ( "daughter" ) . isChildOf ( members . get ( "spouse" ) ) ) ) ; }
Beispielhafte Familie: Vater, Mutter, zwei Kinder
Beispielhafte Familie : Vater Mutter zwei Kinder