@Singleton public class ProductItemToImage extends Object implements com.google.common.base.Function<ProductItem,Image>
Constructor and Description |
---|
ProductItemToImage() |
Modifier and Type | Method and Description |
---|---|
Image |
apply(ProductItem productItem) |
static com.google.common.base.Function<ProductItem,String> |
imageId()
Generates an id for an Image.
|
static com.google.common.base.Function<ProductItem,Integer> |
osBits()
Parses the item description to determine the number of OS bits
Expects the number to be in parenthesis and to contain the word "bit".
|
static com.google.common.base.Function<ProductItem,OsFamily> |
osFamily()
Parses the item description to determine the OSFamily
|
static com.google.common.base.Function<ProductItem,String> |
osVersion()
Parses the item description to determine the os version
|
public Image apply(ProductItem productItem)
apply
in interface com.google.common.base.Function<ProductItem,Image>
public static com.google.common.base.Function<ProductItem,OsFamily> osFamily()
public static com.google.common.base.Function<ProductItem,String> osVersion()
NoSuchElementException
- if the version cannot be determinedpublic static com.google.common.base.Function<ProductItem,Integer> osBits()
NoSuchElementException
- if the number of bits cannot be determinedpublic static com.google.common.base.Function<ProductItem,String> imageId()
Copyright © 2009-2012 jclouds. All Rights Reserved.