Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /java /eclipse-basyx_basyx-java-server-sdk /basyx.submodelservice /basyx.submodelservice.component /example /jars /SubstractOperation.java
| import java.util.List; | |
| import org.eclipse.digitaltwin.aas4j.v3.model.DataTypeDefXsd; | |
| import org.eclipse.digitaltwin.aas4j.v3.model.Operation; | |
| import org.eclipse.digitaltwin.aas4j.v3.model.OperationVariable; | |
| import org.eclipse.digitaltwin.aas4j.v3.model.Property; | |
| import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultOperationVariable; | |
| import org.eclipse.digitaltwin.aas4j.v3.model.impl.DefaultProperty; | |
| public class SubstractOperation { | |
| public OperationVariable[] invoke(String path, Operation op, OperationVariable[] in) { | |
| Property first = (Property) in[0].getValue(); | |
| Property second = (Property) in[1].getValue(); | |
| int iFirst = Integer.parseInt(first.getValue()); | |
| int iSecond = Integer.parseInt(second.getValue()); | |
| int result = iFirst - iSecond; | |
| Property prop = new DefaultProperty.Builder().value(String.valueOf(result)).valueType(DataTypeDefXsd.INT).build(); | |
| return new OperationVariable[] {new DefaultOperationVariable.Builder().value(prop).build()}; | |
| } | |
| } | |
Xet Storage Details
- Size:
- 987 Bytes
- Xet hash:
- 5553605e8d0fe42d4bec63f2afa02ada4a7f818b994f6953826ffb562945964a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.