I want to parse a YAML-file via Jackson but encounter the problem that one of the properties (let's call it 'Event') has a string called 'type' and a 'properties' object that differs for different Events. My issue is that I need to define the POJOs for this YAML. Therefore, I want to define a Hashmap with VariableObject that can be any of some predefined classes (for brevity, let's say Shipping and Inventory).

How can I implement a Hashmap like that?

```
public class Event {
    private static String type;
    private static Map<String, VariableObject> properties;

    public static void main(String[] args) {
        Inventory inventory = new Inventory("inventoryName", 13);
        properties.put("Inventory", inventory);
        Shipping shipping = new Shipping("shippingName", true);
        properties.put("Shipping", shipping);
    }
}

public class Inventory {

    private static String name;
    private static int someNumber;

    public Inventory(String name, int someNumber) {
        this.name = name;
        this.someNumber = someNumber;
    }
}

public class Shipping {

    private static String name;
    private static boolean someBoolean;

    public Shipping(String name, boolean someBoolean) {
        this.name = name;
        this.someBoolean = someBoolean;
    }
}

```