View Javadoc
1   package io.guixer.logs.lines;
2   
3   import static com.google.common.base.Preconditions.checkNotNull;
4   import static io.guixer.logs.lines.LogLine.Type.ATTRIBUTE;
5   
6   import javax.annotation.Nullable;
7   
8   import io.guixer.types.AttributeScope;
9   
10  public final class AttributeLogLine extends AbstractLogLine {
11  
12  	private final AttributeScope scope;
13  	private final String name;
14  	private final String value;
15  
16  	public AttributeLogLine(
17  		final long timeMillis,
18  		final String rawText,
19  		final AttributeScope scope,
20  		final String name,
21  		final String value
22  	) {
23  
24  		super(timeMillis, ATTRIBUTE, rawText);
25  
26  		this.scope = checkNotNull(scope, "scope");
27  		this.name = checkNotNull(name, "name");
28  		this.value = checkNotNull(value, "value");
29  	}
30  
31  	public AttributeScope getScope() {
32  
33  		return scope;
34  	}
35  
36  	public String getName() {
37  
38  		return name;
39  	}
40  
41  	@Nullable
42  	public String getValue() {
43  
44  		return value;
45  	}
46  }