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 classCoffeePickParseRequest.BuilderBuilds instances of typeCoffeePickParseRequest. -
Method Summary
Modifier and Type Method Description static CoffeePickParseRequest.Builderbuilder()Creates a builder forCoffeePickParseRequest.static CoffeePickParseRequestcopyOf(CoffeePickParseRequestType instance)Creates an immutable copy of aCoffeePickParseRequestTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofCoffeePickParseRequestthat have equal attribute values.inthashCode()Computes a hash code from attributes:uri,stream.java.io.InputStreamstream()java.lang.StringtoString()Prints the immutable valueCoffeePickParseRequestwith attribute values.java.net.URIuri()CoffeePickParseRequestwithStream(java.io.InputStream value)Copy the current immutable object by setting a value for thestreamattribute.CoffeePickParseRequestwithUri(java.net.URI value)Copy the current immutable object by setting a value for theuriattribute.
-
Method Details
-
uri
public java.net.URI uri()- Specified by:
uriin interfaceCoffeePickParseRequestType- Returns:
- The URI of the input stream, for diagnostics
-
stream
public java.io.InputStream stream()- Specified by:
streamin interfaceCoffeePickParseRequestType- Returns:
- The input stream
-
withUri
Copy the current immutable object by setting a value for theuriattribute. 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
thisobject
-
withStream
Copy the current immutable object by setting a value for thestreamattribute. 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
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofCoffeePickParseRequestthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:uri,stream.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueCoffeePickParseRequestwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aCoffeePickParseRequestTypevalue. 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) // requireduri.setStream(java.io.InputStream) // requiredstream.build();- Returns:
- A new CoffeePickParseRequest builder
-