View Javadoc
1   package io.guixer.logs.lines;
2   
3   import static com.google.common.base.Preconditions.checkNotNull;
4   
5   import io.guixer.logs.LoggedBy;
6   
7   public abstract class AssertBooleanLogLine extends AbstractLogLine {
8   
9   	private final LoggedBy locator;
10  	private final String attribute;
11  	private final boolean success;
12  
13  	public AssertBooleanLogLine(
14  		final long timeMillis,
15  		final Type type,
16  		final String rawText,
17  		final LoggedBy locator,
18  		final String attribute,
19  		final boolean success
20  	) {
21  
22  		super(timeMillis, type, rawText);
23  
24  		this.locator = checkNotNull(locator, "locator");
25  		this.attribute = checkNotNull(attribute, "attribute");
26  		this.success = success;
27  	}
28  
29  	public final LoggedBy getLocator() {
30  
31  		return locator;
32  	}
33  
34  	public final String getAttribute() {
35  
36  		return attribute;
37  	}
38  
39  	public final boolean isSuccess() {
40  
41  		return success;
42  	}
43  
44  	public final boolean isFailure() {
45  
46  		return !success;
47  	}
48  }