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
38ab88de
Commit
38ab88de
authored
Feb 27, 2018
by
Deepak Jayaram
Browse files
feb 27 fine tuning
parent
ceda0474
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/information/DefaultVehicularPointInformation.java
View file @
38ab88de
...
...
@@ -74,6 +74,9 @@ public class DefaultVehicularPointInformation<S extends Object> implements Vehic
@Override
public
<
T
>
void
setAttribute
(
AvailableInformationAttributes
pKey
,
T
pValue
)
{
if
(
pKey
.
equals
(
AvailableInformationAttributes
.
VALUE
))
{
_value
=
(
S
)
pValue
;
}
_attributes
.
put
(
pKey
,
pValue
);
}
...
...
@@ -114,6 +117,11 @@ public class DefaultVehicularPointInformation<S extends Object> implements Vehic
return
null
;
}
@Override
public
PointInformation
createDefaultInformation
()
{
throw
new
UnsupportedOperationException
(
"Cannot create default"
);
}
protected
DefaultVehicularPointInformation
<
S
>
cloneInformation
()
{
return
new
DefaultVehicularPointInformation
<>(
getEdge
(),
getLocation
(),
getDetectionDate
(),
getValue
());
}
...
...
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/information/JamInformation.java
View file @
38ab88de
...
...
@@ -27,4 +27,11 @@ public class JamInformation extends DefaultVehicularPointInformation<Boolean> {
protected
DefaultVehicularPointInformation
<
Boolean
>
cloneInformation
()
{
return
new
JamInformation
(
getEdge
(),
getLocation
(),
getDetectionDate
(),
getValue
());
}
@Override
public
PointInformation
createDefaultInformation
()
{
PointInformation
<
Boolean
>
information
=
clonePointInformation
();
information
.
setAttribute
(
AvailableInformationAttributes
.
VALUE
,
false
);
return
information
;
}
}
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/information/NotificationBasedVehicularPointInformation.java
View file @
38ab88de
...
...
@@ -97,4 +97,8 @@ public class NotificationBasedVehicularPointInformation implements VehicularPoin
throw
new
UnsupportedOperationException
(
"Cannot set date"
);
}
@Override
public
PointInformation
createDefaultInformation
()
{
throw
new
UnsupportedOperationException
(
"Cannot create default"
);
}
}
src/de/tudarmstadt/maki/simonstrator/api/component/vehicular/information/PointInformation.java
View file @
38ab88de
...
...
@@ -63,4 +63,6 @@ public interface PointInformation<S extends Object> extends Cloneable {
PointInformation
<
S
>
clonePointInformation
();
void
setDetectionTime
(
long
_detectionTime
);
PointInformation
createDefaultInformation
();
}
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