| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableLine.Builder
Builds instances of type
ImmutableLine. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableLine.Builder |
builder()
Creates a builder for
ImmutableLine. |
String |
className() |
static ImmutableLine |
copyOf(Line instance)
Creates an immutable copy of a
Line value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableLine that have equal attribute values. |
String |
fileName() |
int |
hashCode()
Computes a hash code from attributes:
className, fileName, methodName, lineNumber. |
int |
lineNumber() |
String |
methodName() |
String |
toString()
Prints the immutable value
Line with attribute values. |
ImmutableLine |
withClassName(String value)
Copy the current immutable object by setting a value for the
className attribute. |
ImmutableLine |
withFileName(String value)
Copy the current immutable object by setting a value for the
fileName attribute. |
ImmutableLine |
withLineNumber(int value)
Copy the current immutable object by setting a value for the
lineNumber attribute. |
ImmutableLine |
withMethodName(String value)
Copy the current immutable object by setting a value for the
methodName attribute. |
public String className()
public String fileName()
public String methodName()
methodName in interface LinemethodName attributepublic int lineNumber()
lineNumber in interface LinelineNumber attributepublic final ImmutableLine withClassName(String value)
className attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for classNamethis objectpublic final ImmutableLine withFileName(String value)
fileName attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for fileNamethis objectpublic final ImmutableLine withMethodName(String value)
methodName attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for methodNamethis objectpublic final ImmutableLine withLineNumber(int value)
lineNumber attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for lineNumberthis objectpublic boolean equals(Object another)
ImmutableLine that have equal attribute values.public int hashCode()
className, fileName, methodName, lineNumber.public String toString()
Line with attribute values.public static ImmutableLine copyOf(Line instance)
Line value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableLine.Builder builder()
ImmutableLine.Copyright © 2017. All rights reserved.