Class ImmutableIncrementalCache

java.lang.Object
io.github.ascopes.protobufmavenplugin.sources.incremental.ImmutableIncrementalCache
All Implemented Interfaces:
IncrementalCache

@Generated("org.immutables.processor.ProxyProcessor") final class ImmutableIncrementalCache extends Object implements IncrementalCache
Immutable implementation of IncrementalCache.

Use the builder to create immutable instances: ImmutableIncrementalCache.builder().

  • Field Details

  • Constructor Details

  • Method Details

    • getDependencies

      public Map<Path,String> getDependencies()
      Specified by:
      getDependencies in interface IncrementalCache
      Returns:
      The value of the dependencies attribute
    • getSources

      public Map<Path,String> getSources()
      Specified by:
      getSources in interface IncrementalCache
      Returns:
      The value of the sources attribute
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableIncrementalCache that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalTo

      private boolean equalTo(int synthetic, ImmutableIncrementalCache another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: dependencies, sources.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableIncrementalCache.Builder builder()
      Creates a builder for ImmutableIncrementalCache.
       ImmutableIncrementalCache.builder()
          .putDependencies|putAllDependencies(java.nio.file.Path => String) // dependencies mappings
          .putSources|putAllSources(java.nio.file.Path => String) // sources mappings
          .build();
       
      Returns:
      A new ImmutableIncrementalCache builder
    • createUnmodifiableMap

      private static <K,V> Map<K,V> createUnmodifiableMap(boolean checkNulls, boolean skipNulls, Map<? extends K, ? extends V> map)