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 classParsedRepository.BuilderBuilds instances of typeParsedRepository.-
Nested classes/interfaces inherited from interface com.io7m.coffeepick.runtime.parser.spi.ParserResultType
ParserResultType.Kind, ParserResultType.ParsedRepositoryType, ParserResultType.ParsedRuntimeType
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParsedRepository.Builderbuilder()Creates a builder forParsedRepository.static ParsedRepositorycopyOf(ParserResultType.ParsedRepositoryType instance)Creates an immutable copy of aParserResultType.ParsedRepositoryTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofParsedRepositorythat have equal attribute values.inthashCode()Computes a hash code from attributes:repository.static ParsedRepositoryof(RuntimeRepositoryDescription repository)Construct a new immutableParsedRepositoryinstance.RuntimeRepositoryDescriptionrepository()java.lang.StringtoString()Prints the immutable valueParsedRepositorywith attribute values.ParsedRepositorywithRepository(RuntimeRepositoryDescription value)Copy the current immutable object by setting a value for therepositoryattribute.-
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 Detail
-
repository
public RuntimeRepositoryDescription repository()
- Specified by:
repositoryin interfaceParserResultType.ParsedRepositoryType- Returns:
- The actual repository value
-
withRepository
public final ParsedRepository withRepository(RuntimeRepositoryDescription value)
Copy the current immutable object by setting a value for therepositoryattribute. 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
thisobject
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofParsedRepositorythat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:repository.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueParsedRepositorywith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
public static ParsedRepository of(RuntimeRepositoryDescription repository)
Construct a new immutableParsedRepositoryinstance.- Parameters:
repository- The value for therepositoryattribute- Returns:
- An immutable ParsedRepository instance
-
copyOf
public static ParsedRepository copyOf(ParserResultType.ParsedRepositoryType instance)
Creates an immutable copy of aParserResultType.ParsedRepositoryTypevalue. 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
public static ParsedRepository.Builder builder()
Creates a builder forParsedRepository.ParsedRepository.builder() .setRepository(com.io7m.coffeepick.runtime.RuntimeRepositoryDescription) // requiredrepository.build();- Returns:
- A new ParsedRepository builder
-
-