public class HardwareBuilderFromResourceAllocations implements
Function<Iterable<? extends ResourceAllocationSettingData>, HardwareBuilder> {
@Override
public HardwareBuilder apply(Iterable<? extends ResourceAllocationSettingData> from) {
HardwareBuilder builder = new HardwareBuilder();
builder.volumes(transform(filter(from, CIMPredicates.resourceTypeIn(ResourceType.DISK_DRIVE,
ResourceType.BASE_PARTITIONABLE_UNIT, ResourceType.PARTITIONABLE_UNIT)),
new Function<ResourceAllocationSettingData, Volume>() {
@Override
public Volume apply(ResourceAllocationSettingData from) {