* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.sdc.be.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openecomp.sdc.be.datatypes.elements.OperationDataDefinition;
/**
- * Definition of the operations that can be performed on (instances of) a Node
- * Type.
+ * Definition of the operations that can be performed on (instances of) a Node Type.
*
* @author esofer
*/
@JsonIgnore
public Map<String, Operation> getOperationsMap() {
- return getOperations().entrySet()
- .stream()
- .collect(Collectors.toMap(Map.Entry::getKey, e -> new Operation(e
- .getValue())));
+ return getOperations().entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> new Operation(e.getValue())));
}
@JsonIgnore
if (MapUtils.isEmpty(operations)) {
return;
}
- final Map<String, OperationDataDefinition> convertedOperation = operations.entrySet()
- .stream()
+ final Map<String, OperationDataDefinition> convertedOperation = operations.entrySet().stream()
.collect(Collectors.toMap(Map.Entry::getKey, e -> new OperationDataDefinition(e.getValue())));
setOperations(convertedOperation);
}
/**
* Checks if the interface has the given operation
+ *
* @param operation the operation to check
* @return {@code true} if the operation exists, {@code false} otherwise
*/
if (MapUtils.isEmpty(operationMap)) {
return false;
}
- return operationMap.keySet().stream()
- .anyMatch(operation1 -> operation1.equalsIgnoreCase(operation));
+ return operationMap.keySet().stream().anyMatch(operation1 -> operation1.equalsIgnoreCase(operation));
}
-
}