diff options
author | Gary Wu <gary.i.wu@huawei.com> | 2017-04-21 12:34:25 -0700 |
---|---|---|
committer | Patrick Brady <pb071s@att.com> | 2017-05-01 10:58:52 -0700 |
commit | fa68917a405125b75c6b23ca68310aab8c94a79a (patch) | |
tree | e9ed20f26647d1be5c308e772a223d9ab8500116 /appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java | |
parent | 14365b73fbf5111e62ba91b9d7f80602db383a3c (diff) |
Make Flags immutable
Change-Id: Ib2e06d41d4e1eb6fb40144258067d2c71ac1d620
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java')
-rw-r--r-- | appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Flags.java | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Flags.java b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Flags.java index 4f4ddba35..519ea34a4 100644 --- a/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Flags.java +++ b/appc-dispatcher/appc-dispatcher-common/domain-model-lib/src/main/java/org/openecomp/appc/domainmodel/lcm/Flags.java @@ -24,38 +24,29 @@ package org.openecomp.appc.domainmodel.lcm; public class Flags { - private boolean force; - private int ttl; - private Mode mode; + private final boolean force; + private final int ttl; + private final Mode mode; - public boolean isForce() { - return force; + public Flags(Mode mode, boolean force, int ttl) { + super(); + this.force = force; + this.ttl = ttl; + this.mode = mode; } - public void setForce(boolean force) { - this.force = force; + public boolean isForce() { + return force; } public int getTtl() { return ttl; } - public void setTtl(int ttl) { - this.ttl = ttl; - } - public Mode getMode() { return mode; } - public void setMode(Mode mode) { - this.mode = mode; - } - - public void setMode(String mode) { - this.mode = Mode.valueOf(mode); - } - @Override public String toString() { return "Flags{" + |