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
  • Method Details

    • repository

      public RuntimeRepositoryDescription repository()
      Specified by:
      repository in interface ParserResultType.ParsedRepositoryType
      Returns:
      The actual repository value
    • withRepository

      public final ParsedRepository withRepository​(RuntimeRepositoryDescription value)
      Copy the current immutable object by setting a value for the repository attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      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 of ParsedRepository that have equal attribute values.
      Overrides:
      equals in class java.lang.Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: repository.
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      hashCode value
    • toString

      public java.lang.String toString()
      Prints the immutable value ParsedRepository with attribute values.
      Overrides:
      toString in class java.lang.Object
      Returns:
      A string representation of the value
    • of

      public static ParsedRepository of​(RuntimeRepositoryDescription repository)
      Construct a new immutable ParsedRepository instance.
      Parameters:
      repository - The value for the repository attribute
      Returns:
      An immutable ParsedRepository instance
    • copyOf

      public static ParsedRepository copyOf​(ParserResultType.ParsedRepositoryType instance)
      Creates an immutable copy of a ParserResultType.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

      public static ParsedRepository.Builder builder()
      Creates a builder for ParsedRepository.
       ParsedRepository.builder()
          .setRepository(com.io7m.coffeepick.runtime.RuntimeRepositoryDescription) // required repository
          .build();
       
      Returns:
      A new ParsedRepository builder