class ResourceAllocation {

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof ResourceAllocation)) {
            return false;
        }
        final ResourceAllocation that = (ResourceAllocation) obj;
        return Objects.equals(this.resource, that.resource)
                && Objects.equals(this.consumerId, that.consumerId);
    }

    public  ResourceAllocation(Resource resource, ResourceConsumerId consumerId);
    public  ResourceAllocation(Resource resource, ResourceConsumer consumer);
    private  ResourceAllocation();

}