Class CoffeePickParseRequest
java.lang.Object
com.io7m.coffeepick.runtime.parser.api.CoffeePickParseRequest
- All Implemented Interfaces:
CoffeePickParseRequestType
public final class CoffeePickParseRequest extends java.lang.Object implements CoffeePickParseRequestType
A request to parse something.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CoffeePickParseRequest.Builder
Builds instances of typeCoffeePickParseRequest
. -
Method Summary
Modifier and Type Method Description static CoffeePickParseRequest.Builder
builder()
Creates a builder forCoffeePickParseRequest
.static CoffeePickParseRequest
copyOf(CoffeePickParseRequestType instance)
Creates an immutable copy of aCoffeePickParseRequestType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofCoffeePickParseRequest
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:uri
,stream
.java.io.InputStream
stream()
java.lang.String
toString()
Prints the immutable valueCoffeePickParseRequest
with attribute values.java.net.URI
uri()
CoffeePickParseRequest
withStream(java.io.InputStream value)
Copy the current immutable object by setting a value for thestream
attribute.CoffeePickParseRequest
withUri(java.net.URI value)
Copy the current immutable object by setting a value for theuri
attribute.
-
Method Details
-
uri
public java.net.URI uri()- Specified by:
uri
in interfaceCoffeePickParseRequestType
- Returns:
- The URI of the input stream, for diagnostics
-
stream
public java.io.InputStream stream()- Specified by:
stream
in interfaceCoffeePickParseRequestType
- Returns:
- The input stream
-
withUri
Copy the current immutable object by setting a value for theuri
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for uri- Returns:
- A modified copy of the
this
object
-
withStream
Copy the current immutable object by setting a value for thestream
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for stream- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofCoffeePickParseRequest
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()Computes a hash code from attributes:uri
,stream
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueCoffeePickParseRequest
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aCoffeePickParseRequestType
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable CoffeePickParseRequest instance
-
builder
Creates a builder forCoffeePickParseRequest
.CoffeePickParseRequest.builder() .setUri(java.net.URI) // required
uri
.setStream(java.io.InputStream) // requiredstream
.build();- Returns:
- A new CoffeePickParseRequest builder
-