Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid W. Miller2017-10-13 16:16:32 -0400
committerDavid Miller2017-10-16 16:02:36 -0400
commit14132ecbef674c8ab406699736ca03415f22473d (patch)
treeb3ba80cd411e8439bed01f9b9861b84507c6e1e5
parente81c81d68e0b6a00affbfa905e6f0df6feedfe56 (diff)
downloadorg.eclipse.osee-14132ecbef674c8ab406699736ca03415f22473d.tar.gz
org.eclipse.osee-14132ecbef674c8ab406699736ca03415f22473d.tar.xz
org.eclipse.osee-14132ecbef674c8ab406699736ca03415f22473d.zip
refinement: Improve type comparison for workflows
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
index 7db3c48d2f..5202bb9382 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
@@ -247,12 +247,18 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
}
/**
- * Determines if this artifact's type equals, or is a sub-type of, at least one of the given artifact types.
+ * Determines if this artifact's type equals, or is a sub-type of, at least one of the given artifact types.
+ * This is a relatively expensive operation, only use this method when you need either the multiple artifact
+ * types or to have sub-types included; otherwise us the less expensive equalsType below.
*/
public final boolean isOfType(ArtifactTypeId... artifactTypes) {
return getArtifactType().inheritsFrom(artifactTypes);
}
+ public final boolean equalsType(ArtifactTypeId artifactType) {
+ return artifactTypeId.equals(artifactType);
+ }
+
@Override
public String toString() {
return getName();

Back to the top