EMMA Coverage Report (generated Tue Jun 21 05:51:52 EDT 2011)
[all classes][org.jclouds.compute.domain]

COVERAGE SUMMARY FOR SOURCE FILE [OperatingSystemBuilder.java]

nameclass, %method, %block, %line, %
OperatingSystemBuilder.java0%   (0/1)0%   (0/9)0%   (0/68)0%   (0/15)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class OperatingSystemBuilder0%   (0/1)0%   (0/9)0%   (0/68)0%   (0/15)
OperatingSystemBuilder (): void 0%   (0/1)0%   (0/3)0%   (0/1)
arch (String): OperatingSystemBuilder 0%   (0/1)0%   (0/5)0%   (0/2)
build (): OperatingSystem 0%   (0/1)0%   (0/16)0%   (0/1)
description (String): OperatingSystemBuilder 0%   (0/1)0%   (0/8)0%   (0/2)
family (OsFamily): OperatingSystemBuilder 0%   (0/1)0%   (0/5)0%   (0/2)
fromOperatingSystem (OperatingSystem): OperatingSystem 0%   (0/1)0%   (0/16)0%   (0/1)
is64Bit (boolean): OperatingSystemBuilder 0%   (0/1)0%   (0/5)0%   (0/2)
name (String): OperatingSystemBuilder 0%   (0/1)0%   (0/5)0%   (0/2)
version (String): OperatingSystemBuilder 0%   (0/1)0%   (0/5)0%   (0/2)

1/**
2 *
3 * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
4 *
5 * ====================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 * ====================================================================
18 */
19package org.jclouds.compute.domain;
20 
21import static com.google.common.base.Preconditions.checkNotNull;
22 
23import javax.annotation.Nullable;
24 
25/**
26 * 
27 * @author Adrian Cole
28 */
29public class OperatingSystemBuilder {
30   @Nullable
31   private OsFamily family;
32   @Nullable
33   private String name;
34   @Nullable
35   private String arch;
36   @Nullable
37   private String version;
38   private String description;
39   private boolean is64Bit;
40 
41   public OperatingSystemBuilder family(@Nullable OsFamily family) {
42      this.family = family;
43      return this;
44   }
45 
46   public OperatingSystemBuilder name(@Nullable String name) {
47      this.name = name;
48      return this;
49   }
50 
51   public OperatingSystemBuilder arch(@Nullable String arch) {
52      this.arch = arch;
53      return this;
54   }
55 
56   public OperatingSystemBuilder version(@Nullable String version) {
57      this.version = version;
58      return this;
59   }
60 
61   public OperatingSystemBuilder description(String description) {
62      this.description = checkNotNull(description, "description");
63      return this;
64   }
65 
66   public OperatingSystemBuilder is64Bit(boolean is64Bit) {
67      this.is64Bit = is64Bit;
68      return this;
69   }
70 
71   public OperatingSystem build() {
72      return new OperatingSystem(family, name, version, arch, description, is64Bit);
73   }
74 
75   public static OperatingSystem fromOperatingSystem(OperatingSystem in) {
76      return new OperatingSystem(in.getFamily(), in.getName(), in.getVersion(), in.getArch(), in.getDescription(),
77            in.is64Bit());
78   }
79}

[all classes][org.jclouds.compute.domain]
EMMA 2.0.5312 (C) Vladimir Roubtsov