Class CoffeePickCatalogEventRuntimeDownloading

java.lang.Object
com.io7m.coffeepick.api.CoffeePickCatalogEventRuntimeDownloading
All Implemented Interfaces:
CoffeePickCatalogEventRuntimeDownloadingType, CoffeePickCatalogEventType, CoffeePickEventType

public final class CoffeePickCatalogEventRuntimeDownloading
extends java.lang.Object
implements CoffeePickCatalogEventRuntimeDownloadingType
A download has started.
  • Method Details

    • id

      public java.lang.String id()
      Specified by:
      id in interface CoffeePickCatalogEventRuntimeDownloadingType
      Returns:
      The ID of the runtime
    • octetsPerSecond

      public double octetsPerSecond()
      Specified by:
      octetsPerSecond in interface CoffeePickCatalogEventRuntimeDownloadingType
      Returns:
      The number of octets being received per second
    • expected

      public long expected()
      Specified by:
      expected in interface CoffeePickCatalogEventRuntimeDownloadingType
      Returns:
      The number of octets expected
    • received

      public long received()
      Specified by:
      received in interface CoffeePickCatalogEventRuntimeDownloadingType
      Returns:
      The number of octets that have been received
    • withId

      public final CoffeePickCatalogEventRuntimeDownloading withId​(java.lang.String value)
      Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for id
      Returns:
      A modified copy of the this object
    • withOctetsPerSecond

      public final CoffeePickCatalogEventRuntimeDownloading withOctetsPerSecond​(double value)
      Copy the current immutable object by setting a value for the octetsPerSecond attribute. A value strict bits equality used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for octetsPerSecond
      Returns:
      A modified copy of the this object
    • withExpected

      public final CoffeePickCatalogEventRuntimeDownloading withExpected​(long value)
      Copy the current immutable object by setting a value for the expected attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for expected
      Returns:
      A modified copy of the this object
    • withReceived

      public final CoffeePickCatalogEventRuntimeDownloading withReceived​(long value)
      Copy the current immutable object by setting a value for the received attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for received
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals​(java.lang.Object another)
      This instance is equal to all instances of CoffeePickCatalogEventRuntimeDownloading 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: id, octetsPerSecond, expected, received.
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      hashCode value
    • toString

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

      public static CoffeePickCatalogEventRuntimeDownloading of​(java.lang.String id, double octetsPerSecond, long expected, long received)
      Construct a new immutable CoffeePickCatalogEventRuntimeDownloading instance.
      Parameters:
      id - The value for the id attribute
      octetsPerSecond - The value for the octetsPerSecond attribute
      expected - The value for the expected attribute
      received - The value for the received attribute
      Returns:
      An immutable CoffeePickCatalogEventRuntimeDownloading instance
    • copyOf

      Creates an immutable copy of a CoffeePickCatalogEventRuntimeDownloadingType 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 CoffeePickCatalogEventRuntimeDownloading instance
    • builder

      Creates a builder for CoffeePickCatalogEventRuntimeDownloading.
       CoffeePickCatalogEventRuntimeDownloading.builder()
          .setId(String) // required id
          .setOctetsPerSecond(double) // required octetsPerSecond
          .setExpected(long) // required expected
          .setReceived(long) // required received
          .build();
       
      Returns:
      A new CoffeePickCatalogEventRuntimeDownloading builder