org.jclouds.softlayer.compute.functions
Class ProductItemsToHardware

java.lang.Object
  extended by org.jclouds.softlayer.compute.functions.ProductItemsToHardware
All Implemented Interfaces:
com.google.common.base.Function<Iterable<ProductItem>,Hardware>

@Singleton
public class ProductItemsToHardware
extends Object
implements com.google.common.base.Function<Iterable<ProductItem>,Hardware>

Converts a set of ProductItems to Hardware. All cores have a speed of 2.0Ghz The Hardware Id will be a comma separated list containing the price ids: cpus,ram,volume

Author:
Jason King

Constructor Summary
ProductItemsToHardware()
           
ProductItemsToHardware(Pattern cpuDescriptionRegex, Pattern diskCategoryRegex)
           
 
Method Summary
 Hardware apply(Iterable<ProductItem> items)
           
static com.google.common.base.Function<List<ProductItem>,String> hardwareId()
          Generates a hardwareId based on the priceId's of the items in the list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Function
equals
 

Constructor Detail

ProductItemsToHardware

@Inject
public ProductItemsToHardware()

ProductItemsToHardware

public ProductItemsToHardware(Pattern cpuDescriptionRegex,
                              Pattern diskCategoryRegex)
Method Detail

apply

public Hardware apply(Iterable<ProductItem> items)
Specified by:
apply in interface com.google.common.base.Function<Iterable<ProductItem>,Hardware>

hardwareId

public static com.google.common.base.Function<List<ProductItem>,String> hardwareId()
Generates a hardwareId based on the priceId's of the items in the list

Returns:
comma separated list of priceid's


Copyright © 2009-2012 jclouds. All Rights Reserved.