Commit bad4715c authored by Thomas Michael Timmermanns's avatar Thomas Michael Timmermanns
Browse files

a small fix

parent f6ee8b91
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<groupId>de.monticore.lang.monticar</groupId> <groupId>de.monticore.lang.monticar</groupId>
<artifactId>cnn-train</artifactId> <artifactId>cnn-train</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.2-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= --> <!-- == PROJECT DEPENDENCIES ============================================= -->
...@@ -82,12 +82,6 @@ ...@@ -82,12 +82,6 @@
<version>${guava.version}</version> <version>${guava.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.7.22</version>
</dependency>
<!-- MontiCore Dependencies --> <!-- MontiCore Dependencies -->
<dependency> <dependency>
<groupId>de.monticore</groupId> <groupId>de.monticore</groupId>
......
/**
*
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
*
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
* *******************************************************************************
*/
package de.monticore.lang.monticar.cnntrain._ast;
import java.util.Optional;
public class ASTParameterRhs extends ASTParameterRhsTOP {
private boolean containsBoolean;
public ASTParameterRhs() {
}
public ASTParameterRhs(String stringVal, String intVal, String doubleVal, String refOrBool) {
super(stringVal, intVal, doubleVal, refOrBool);
}
@Override
public void setRefOrBool(String refOrBool) {
if (refOrBool.equalsIgnoreCase("true")
|| refOrBool.equalsIgnoreCase("false")){
containsBoolean = true;
super.setRefOrBool(refOrBool.toLowerCase());
}
else {
containsBoolean = false;
super.setRefOrBool(refOrBool);
}
}
public Optional<String> getRef(){
if (containsBoolean) {
return Optional.empty();
}
else {
return getRefOrBool();
}
}
public Optional<String> getBooleanVal(){
if (containsBoolean) {
return getRefOrBool();
}
else {
return Optional.empty();
}
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment