Package com.io7m.coffeepick.api
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCoffeePickCatalogEventRuntimeDownloading.BuilderBuilds instances of typeCoffeePickCatalogEventRuntimeDownloading.-
Nested classes/interfaces inherited from interface com.io7m.coffeepick.api.CoffeePickEventType
CoffeePickEventType.Severity
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CoffeePickCatalogEventRuntimeDownloading.Builderbuilder()Creates a builder forCoffeePickCatalogEventRuntimeDownloading.static CoffeePickCatalogEventRuntimeDownloadingcopyOf(CoffeePickCatalogEventRuntimeDownloadingType instance)Creates an immutable copy of aCoffeePickCatalogEventRuntimeDownloadingTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofCoffeePickCatalogEventRuntimeDownloadingthat have equal attribute values.longexpected()inthashCode()Computes a hash code from attributes:id,octetsPerSecond,expected,received.java.lang.Stringid()doubleoctetsPerSecond()static CoffeePickCatalogEventRuntimeDownloadingof(java.lang.String id, double octetsPerSecond, long expected, long received)Construct a new immutableCoffeePickCatalogEventRuntimeDownloadinginstance.longreceived()java.lang.StringtoString()Prints the immutable valueCoffeePickCatalogEventRuntimeDownloadingwith attribute values.CoffeePickCatalogEventRuntimeDownloadingwithExpected(long value)Copy the current immutable object by setting a value for theexpectedattribute.CoffeePickCatalogEventRuntimeDownloadingwithId(java.lang.String value)Copy the current immutable object by setting a value for theidattribute.CoffeePickCatalogEventRuntimeDownloadingwithOctetsPerSecond(double value)Copy the current immutable object by setting a value for theoctetsPerSecondattribute.CoffeePickCatalogEventRuntimeDownloadingwithReceived(long value)Copy the current immutable object by setting a value for thereceivedattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.io7m.coffeepick.api.CoffeePickCatalogEventRuntimeDownloadingType
progress, severity
-
-
-
-
Method Detail
-
id
public java.lang.String id()
- Specified by:
idin interfaceCoffeePickCatalogEventRuntimeDownloadingType- Returns:
- The ID of the runtime
-
octetsPerSecond
public double octetsPerSecond()
- Specified by:
octetsPerSecondin interfaceCoffeePickCatalogEventRuntimeDownloadingType- Returns:
- The number of octets being received per second
-
expected
public long expected()
- Specified by:
expectedin interfaceCoffeePickCatalogEventRuntimeDownloadingType- Returns:
- The number of octets expected
-
received
public long received()
- Specified by:
receivedin interfaceCoffeePickCatalogEventRuntimeDownloadingType- 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 theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withOctetsPerSecond
public final CoffeePickCatalogEventRuntimeDownloading withOctetsPerSecond(double value)
Copy the current immutable object by setting a value for theoctetsPerSecondattribute. A value strict bits equality used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for octetsPerSecond- Returns:
- A modified copy of the
thisobject
-
withExpected
public final CoffeePickCatalogEventRuntimeDownloading withExpected(long value)
Copy the current immutable object by setting a value for theexpectedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for expected- Returns:
- A modified copy of the
thisobject
-
withReceived
public final CoffeePickCatalogEventRuntimeDownloading withReceived(long value)
Copy the current immutable object by setting a value for thereceivedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for received- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofCoffeePickCatalogEventRuntimeDownloadingthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,octetsPerSecond,expected,received.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueCoffeePickCatalogEventRuntimeDownloadingwith attribute values.- Overrides:
toStringin classjava.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 immutableCoffeePickCatalogEventRuntimeDownloadinginstance.- Parameters:
id- The value for theidattributeoctetsPerSecond- The value for theoctetsPerSecondattributeexpected- The value for theexpectedattributereceived- The value for thereceivedattribute- Returns:
- An immutable CoffeePickCatalogEventRuntimeDownloading instance
-
copyOf
public static CoffeePickCatalogEventRuntimeDownloading copyOf(CoffeePickCatalogEventRuntimeDownloadingType instance)
Creates an immutable copy of aCoffeePickCatalogEventRuntimeDownloadingTypevalue. 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
public static CoffeePickCatalogEventRuntimeDownloading.Builder builder()
Creates a builder forCoffeePickCatalogEventRuntimeDownloading.CoffeePickCatalogEventRuntimeDownloading.builder() .setId(String) // requiredid.setOctetsPerSecond(double) // requiredoctetsPerSecond.setExpected(long) // requiredexpected.setReceived(long) // requiredreceived.build();- Returns:
- A new CoffeePickCatalogEventRuntimeDownloading builder
-
-