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
PeerfactSim.KOM
Commits
c036c435
Commit
c036c435
authored
Feb 08, 2017
by
Björn Richerzhagen
Browse files
Enable pre/postfix-filtering for Metric Outputs
parent
a9f1ba6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/de/tud/kom/p2psim/impl/analyzer/metric/output/AbstractOutput.java
View file @
c036c435
...
...
@@ -46,6 +46,20 @@ public abstract class AbstractOutput implements MetricOutput {
if
(
metric
.
getName
().
equals
(
string
))
{
return
true
;
}
if
(
string
.
endsWith
(
"*"
))
{
// prefix matching
String
mName
=
metric
.
getName
();
if
(
mName
.
startsWith
(
string
.
substring
(
0
,
string
.
length
()-
1
)))
{
return
true
;
}
}
if
(
string
.
startsWith
(
"*"
))
{
// postfix matching
String
mName
=
metric
.
getName
();
if
(
mName
.
endsWith
(
string
.
substring
(
1
,
string
.
length
())))
{
return
true
;
}
}
}
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