From fa68917a405125b75c6b23ca68310aab8c94a79a Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Fri, 21 Apr 2017 12:34:25 -0700 Subject: Make Flags immutable Change-Id: Ib2e06d41d4e1eb6fb40144258067d2c71ac1d620 Signed-off-by: Gary Wu --- .../org/openecomp/appc/domainmodel/lcm/Flags.java | 29 ++++++++-------------- 1 file changed, 10 insertions(+), 19 deletions(-) (limited to 'appc-dispatcher/appc-dispatcher-common') 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{" + -- cgit 1.2.3-korg