1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.jclouds.trmk.vcloud_0_8.domain;
20
21
22
23
24
25
26
27
28
29
30 public class CustomizationParameters {
31 private final boolean customizeNetwork;
32 private final boolean customizePassword;
33 private final boolean customizeSSH;
34
35 public CustomizationParameters(boolean customizeNetwork,
36 boolean customizePassword, boolean customizeSSH) {
37 this.customizeNetwork = customizeNetwork;
38 this.customizePassword = customizePassword;
39 this.customizeSSH = customizeSSH;
40 }
41
42 public boolean canCustomizeNetwork() {
43 return customizeNetwork;
44 }
45
46 public boolean canCustomizePassword() {
47 return customizePassword;
48 }
49
50 public boolean canCustomizeSSH() {
51 return customizeSSH;
52 }
53
54 @Override
55 public int hashCode() {
56 final int prime = 31;
57 int result = 1;
58 result = prime * result + (customizeNetwork ? 1231 : 1237);
59 result = prime * result + (customizePassword ? 1231 : 1237);
60 result = prime * result + (customizeSSH ? 1231 : 1237);
61 return result;
62 }
63
64 @Override
65 public boolean equals(Object obj) {
66 if (this == obj)
67 return true;
68 if (obj == null)
69 return false;
70 if (getClass() != obj.getClass())
71 return false;
72 CustomizationParameters other = (CustomizationParameters) obj;
73 if (customizeNetwork != other.customizeNetwork)
74 return false;
75 if (customizePassword != other.customizePassword)
76 return false;
77 if (customizeSSH != other.customizeSSH)
78 return false;
79 return true;
80 }
81
82 @Override
83 public String toString() {
84 return "CustomizationParameters [customizeNetwork=" + customizeNetwork
85 + ", customizePassword=" + customizePassword + ", customizeSSH="
86 + customizeSSH + "]";
87 }
88 }