Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
languages
EmbeddedMontiArc
Commits
c3f127c1
Commit
c3f127c1
authored
Nov 20, 2017
by
Sascha Niklas Schneiders
Browse files
updated value printing
parent
49661615
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/embeddedmontiarc/embeddedmontiarc/unit/constant/EMAConstantSIUnit.java
View file @
c3f127c1
...
...
@@ -50,10 +50,17 @@ public class EMAConstantSIUnit extends EMAConstantValue {
/**
* Does not return the unit, just the value
*
* @return
*/
@Override
public
String
getValueAsString
(){
return
getRational
().
toString
();
public
String
getValueAsString
()
{
String
result
=
""
;
if
(
getRational
().
getDivisor
().
intValue
()
==
1
)
{
result
+=
getRational
().
intValue
();
}
else
{
result
+=
getRational
().
doubleValue
();
}
return
result
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment