Merge "Convert models to JUnit 5"
[policy/models.git] / models-tosca / src / main / java / org / onap / policy / models / tosca / authorative / concepts / ToscaPolicyType.java
index 75f17ea..671ba32 100644 (file)
@@ -2,8 +2,8 @@
  * ============LICENSE_START=======================================================
  * ONAP Policy Model
  * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019-2020 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.policy.models.tosca.authorative.concepts;
 
-import java.util.Map;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.NoArgsConstructor;
+import lombok.NonNull;
 
 /**
  * Class to represent TOSCA policy type matching input/output from/to client.
@@ -36,11 +36,14 @@ import lombok.NoArgsConstructor;
 @Data
 @EqualsAndHashCode(callSuper = true)
 @NoArgsConstructor
-public class ToscaPolicyType extends ToscaEntity implements Comparable<ToscaPolicyType> {
-    private Map<String, ToscaProperty> properties;
+public class ToscaPolicyType extends ToscaWithToscaProperties {
 
-    @Override
-    public int compareTo(final ToscaPolicyType other) {
-        return compareNameVersion(this, other);
+    /**
+     * Copy Constructor.
+     *
+     * @param copyObject object to copy from
+     */
+    public ToscaPolicyType(@NonNull ToscaPolicyType copyObject) {
+        super(copyObject);
     }
 }