Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ecomod
zmt-jscience
Commits
038f1dbe
Commit
038f1dbe
authored
May 27, 2016
by
mey
Browse files
EnumToAmountMap.java: save enum constants in properties object
parent
ffbe792a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/zmt/params/def/EnumToAmountMap.java
View file @
038f1dbe
...
...
@@ -30,7 +30,7 @@ public class EnumToAmountMap<K extends Enum<K>, Q extends Quantity> extends Enum
implements
ProvidesInspector
{
private
static
final
long
serialVersionUID
=
1L
;
private
final
K
[]
enumConstants
;
private
final
Class
<
K
>
enumType
;
private
final
Unit
<
Q
>
storeUnit
;
private
final
Unit
<
Q
>
displayUnit
;
...
...
@@ -46,7 +46,7 @@ public class EnumToAmountMap<K extends Enum<K>, Q extends Quantity> extends Enum
public
EnumToAmountMap
(
Class
<
K
>
enumType
,
Unit
<
Q
>
storeUnit
,
Unit
<
Q
>
displayUnit
)
{
super
(
enumType
);
this
.
enum
Constants
=
enumType
.
getEnumConstants
()
;
this
.
enum
Type
=
enumType
;
this
.
storeUnit
=
storeUnit
;
this
.
displayUnit
=
displayUnit
;
}
...
...
@@ -108,6 +108,8 @@ public class EnumToAmountMap<K extends Enum<K>, Q extends Quantity> extends Enum
private
class
MyProperties
extends
Properties
{
private
static
final
long
serialVersionUID
=
1L
;
private
final
K
[]
enumConstants
=
enumType
.
getEnumConstants
();
@Override
public
boolean
isVolatile
()
{
return
false
;
...
...
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