CParseErrorTypepublic final class CParseError extends Object implements CParseErrorType
| Modifier and Type | Class | Description |
|---|---|---|
static class |
CParseError.Builder |
Builds instances of type
CParseError. |
CParseErrorType.Severity| Modifier and Type | Method | Description |
|---|---|---|
static CParseError.Builder |
builder() |
Creates a builder for
CParseError. |
static CParseError |
copyOf(CParseErrorType instance) |
Creates an immutable copy of a
CParseErrorType value. |
boolean |
equals(Object another) |
This instance is equal to all instances of
CParseError that have equal attribute values. |
Optional<Exception> |
exception() |
|
int |
hashCode() |
Computes a hash code from attributes:
lexical, severity, message, exception. |
com.io7m.jlexing.core.LexicalPosition<URI> |
lexical() |
|
String |
message() |
|
static CParseError |
of(com.io7m.jlexing.core.LexicalPosition<URI> lexical,
CParseErrorType.Severity severity,
String message,
Optional<? extends Exception> exception) |
Construct a new immutable
CParseError instance. |
CParseErrorType.Severity |
severity() |
|
String |
toString() |
Prints the immutable value
CParseError with attribute values. |
CParseError |
withException(Exception value) |
Copy the current immutable object by setting a present value for the optional
exception attribute. |
CParseError |
withException(Optional<? extends Exception> optional) |
Copy the current immutable object by setting an optional value for the
exception attribute. |
CParseError |
withLexical(com.io7m.jlexing.core.LexicalPosition<URI> value) |
Copy the current immutable object by setting a value for the
lexical attribute. |
CParseError |
withMessage(String value) |
Copy the current immutable object by setting a value for the
message attribute. |
CParseError |
withSeverity(CParseErrorType.Severity value) |
Copy the current immutable object by setting a value for the
severity attribute. |
public com.io7m.jlexing.core.LexicalPosition<URI> lexical()
lexical in interface CParseErrorTypepublic CParseErrorType.Severity severity()
severity in interface CParseErrorTypepublic String message()
message in interface CParseErrorTypepublic Optional<Exception> exception()
exception in interface CParseErrorTypepublic final CParseError withLexical(com.io7m.jlexing.core.LexicalPosition<URI> value)
lexical attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for lexicalthis objectpublic final CParseError withSeverity(CParseErrorType.Severity value)
severity attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for severitythis objectpublic final CParseError withMessage(String value)
message attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for messagethis objectpublic final CParseError withException(Exception value)
exception attribute.value - The value for exceptionthis objectpublic final CParseError withException(Optional<? extends Exception> optional)
exception attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for exceptionthis objectpublic boolean equals(Object another)
CParseError that have equal attribute values.public int hashCode()
lexical, severity, message, exception.public String toString()
CParseError with attribute values.public static CParseError of(com.io7m.jlexing.core.LexicalPosition<URI> lexical, CParseErrorType.Severity severity, String message, Optional<? extends Exception> exception)
CParseError instance.lexical - The value for the lexical attributeseverity - The value for the severity attributemessage - The value for the message attributeexception - The value for the exception attributepublic static CParseError copyOf(CParseErrorType instance)
CParseErrorType 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 CParseError.Builder builder()
CParseError.Copyright © 2018 <code@io7m.com> http://io7m.com