Class ValueField
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.parser.ValueField
-
public final class ValueField extends Object
A descriptor of a value field for use inIEventSinkFactory.create.
-
-
Constructor Summary
Constructors Constructor Description ValueField(String identifier, String name, String description, ContentType<?> contentType)Create a value field.ValueField(IAttribute<?> attribute)Create a value field matching anIAttribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentType<?>getContentType()StringgetDescription()StringgetIdentifier()StringgetName()booleanmatches(IAttribute<?> a)Check if a value field matches an attribute.StringtoString()
-
-
-
Constructor Detail
-
ValueField
public ValueField(IAttribute<?> attribute)
Create a value field matching anIAttribute.- Parameters:
attribute- attribute to match
-
ValueField
public ValueField(String identifier, String name, String description, ContentType<?> contentType)
Create a value field.- Parameters:
identifier- field IDname- human readable field namedescription- human readable field descriptioncontentType- content type of the field
-
-
Method Detail
-
getIdentifier
public String getIdentifier()
-
getName
public String getName()
-
getDescription
public String getDescription()
-
getContentType
public ContentType<?> getContentType()
-
matches
public boolean matches(IAttribute<?> a)
Check if a value field matches an attribute. Note that only ID and content type is checked since human readable values may differ, especially due to translations.- Parameters:
a- attribute to match- Returns:
trueif the value field and the attribute match,falseif not
-
-