From: Jim Hahn Date: Wed, 27 Mar 2019 14:41:44 +0000 (-0400) Subject: Add PfConceptKey.isVersionNull() X-Git-Tag: 3.0.2-ONAP~69^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=c22a522629ab2bec4a17851030617926e2c2f306;p=policy%2Fmodels.git Add PfConceptKey.isVersionNull() Change-Id: I4b2f69bb023a07930b9f418b88078d04a24b7303 Issue-ID: POLICY-1542 Signed-off-by: Jim Hahn --- diff --git a/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java b/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java index 84239e5eb..ee476e3b2 100644 --- a/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java +++ b/models-base/src/main/java/org/onap/policy/models/base/PfConceptKey.java @@ -1,6 +1,7 @@ -/*- +/* * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * ModificationsCopyright (C) 2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -134,6 +135,15 @@ public class PfConceptKey extends PfKey { return this.equals(PfConceptKey.getNullKey()); } + /** + * Determines if the version is "null". + * + * @return {@code true} if the version is null, {@code false} otherwise + */ + public boolean isNullVersion() { + return PfKey.NULL_KEY_VERSION.equals(getVersion()); + } + @Override public PfKey.Compatibility getCompatibility(@NonNull final PfKey otherKey) { if (!(otherKey instanceof PfConceptKey)) {