Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simonstrator
API
Commits
8f511c27
Commit
8f511c27
authored
Mar 27, 2018
by
Tobias Meuser
Browse files
Minor change in generics
parent
7cd2df46
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/information/EnvironmentInformation.java
View file @
8f511c27
...
@@ -112,13 +112,14 @@ public class EnvironmentInformation<T extends LocationBasedEnvironmentProperty>
...
@@ -112,13 +112,14 @@ public class EnvironmentInformation<T extends LocationBasedEnvironmentProperty>
return
null
;
return
null
;
}
}
public
static
List
<
Attribute
<?>>
createAttributeList
(
public
static
<
T
extends
Object
>
List
<
Attribute
<?>>
createAttributeList
(
EnvironmentInformation
<?
extends
LocationBasedEnvironmentProperty
>
pInformation
,
PubSubComponent
pPubSub
)
{
EnvironmentInformation
<?
extends
LocationBasedEnvironmentProperty
>
pInformation
,
PubSubComponent
pPubSub
)
{
List
<
Attribute
<?>>
attributes
=
new
LinkedList
<>();
List
<
Attribute
<?>>
attributes
=
new
LinkedList
<>();
for
(
AvailableInformationAttributes
attribute
:
pInformation
.
getAvailableAttributes
())
{
for
(
AvailableInformationAttributes
attribute
:
pInformation
.
getAvailableAttributes
())
{
Object
value
=
pInformation
.
getAttribute
(
attribute
);
Class
<
T
>
expectedClass
=
(
Class
<
T
>)
attribute
.
getExpectedClass
();
attributes
.
add
(
pPubSub
.
createAttribute
(
Object
.
class
,
attribute
.
getAttributeID
(),
value
));
T
value
=
pInformation
.
getAttribute
(
attribute
);
attributes
.
add
(
pPubSub
.
createAttribute
(
expectedClass
,
attribute
.
getAttributeID
(),
value
));
}
}
Attribute
<
EnvironmentInformation
>
ATTR_VALUE
=
pPubSub
.
createAttribute
(
EnvironmentInformation
.
class
,
Attribute
<
EnvironmentInformation
>
ATTR_VALUE
=
pPubSub
.
createAttribute
(
EnvironmentInformation
.
class
,
AvailableInformationAttributes
.
VALUE
.
getAttributeID
(),
null
);
AvailableInformationAttributes
.
VALUE
.
getAttributeID
(),
null
);
...
...
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