-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#241: Fixed "cannot cast ElmRequirements to ElmExpressionRequirement"
- Loading branch information
1 parent
e217a55
commit 24cd29d
Showing
2 changed files
with
76 additions
and
12 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/main/java/org/opencds/cqf/tooling/visitor/ElmOperatorRequirement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.opencds.cqf.tooling.visitor; | ||
|
||
import org.hl7.elm.r1.Expression; | ||
import org.hl7.elm.r1.VersionedIdentifier; | ||
|
||
import java.util.HashSet; | ||
import java.util.LinkedHashSet; | ||
|
||
public class ElmOperatorRequirement extends ElmExpressionRequirement { | ||
private HashSet<ElmRequirement> requirements = new LinkedHashSet<ElmRequirement>(); | ||
public Iterable<ElmRequirement> getRequirements() { | ||
return requirements; | ||
} | ||
|
||
public ElmOperatorRequirement(VersionedIdentifier libraryIdentifier, Expression expression) { | ||
super(libraryIdentifier, expression); | ||
} | ||
|
||
@Override | ||
public ElmExpressionRequirement combine(ElmExpressionRequirement requirement) { | ||
if (requirement != null) { | ||
requirements.add(requirement); | ||
} | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters