Class ParsedRepository
java.lang.Object
com.io7m.coffeepick.runtime.parser.spi.ParsedRepository
- All Implemented Interfaces:
ParserResultType
,ParserResultType.ParsedRepositoryType
public final class ParsedRepository extends java.lang.Object implements ParserResultType.ParsedRepositoryType
A parsed repository
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParsedRepository.Builder
Builds instances of typeParsedRepository
.Nested classes/interfaces inherited from interface com.io7m.coffeepick.runtime.parser.spi.ParserResultType
ParserResultType.Kind, ParserResultType.ParsedRepositoryType, ParserResultType.ParsedRuntimeType
-
Method Summary
Modifier and Type Method Description static ParsedRepository.Builder
builder()
Creates a builder forParsedRepository
.static ParsedRepository
copyOf(ParserResultType.ParsedRepositoryType instance)
Creates an immutable copy of aParserResultType.ParsedRepositoryType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofParsedRepository
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:repository
.static ParsedRepository
of(RuntimeRepositoryDescription repository)
Construct a new immutableParsedRepository
instance.RuntimeRepositoryDescription
repository()
java.lang.String
toString()
Prints the immutable valueParsedRepository
with attribute values.ParsedRepository
withRepository(RuntimeRepositoryDescription value)
Copy the current immutable object by setting a value for therepository
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.io7m.coffeepick.runtime.parser.spi.ParserResultType.ParsedRepositoryType
kind
-
Method Details
-
repository
- Specified by:
repository
in interfaceParserResultType.ParsedRepositoryType
- Returns:
- The actual repository value
-
withRepository
Copy the current immutable object by setting a value for therepository
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for repository- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofParsedRepository
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:repository
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueParsedRepository
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
Construct a new immutableParsedRepository
instance.- Parameters:
repository
- The value for therepository
attribute- Returns:
- An immutable ParsedRepository instance
-
copyOf
Creates an immutable copy of aParserResultType.ParsedRepositoryType
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 ParsedRepository instance
-
builder
Creates a builder forParsedRepository
.ParsedRepository.builder() .setRepository(com.io7m.coffeepick.runtime.RuntimeRepositoryDescription) // required
repository
.build();- Returns:
- A new ParsedRepository builder
-