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 class
CoffeePickCatalogEventRuntimeDownloading.Builder
Builds instances of typeCoffeePickCatalogEventRuntimeDownloading
.Nested classes/interfaces inherited from interface com.io7m.coffeepick.api.CoffeePickEventType
CoffeePickEventType.Severity
-
Method Summary
Modifier and Type Method Description static CoffeePickCatalogEventRuntimeDownloading.Builder
builder()
Creates a builder forCoffeePickCatalogEventRuntimeDownloading
.static CoffeePickCatalogEventRuntimeDownloading
copyOf(CoffeePickCatalogEventRuntimeDownloadingType instance)
Creates an immutable copy of aCoffeePickCatalogEventRuntimeDownloadingType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofCoffeePickCatalogEventRuntimeDownloading
that have equal attribute values.long
expected()
int
hashCode()
Computes a hash code from attributes:id
,octetsPerSecond
,expected
,received
.java.lang.String
id()
double
octetsPerSecond()
static CoffeePickCatalogEventRuntimeDownloading
of(java.lang.String id, double octetsPerSecond, long expected, long received)
Construct a new immutableCoffeePickCatalogEventRuntimeDownloading
instance.long
received()
java.lang.String
toString()
Prints the immutable valueCoffeePickCatalogEventRuntimeDownloading
with attribute values.CoffeePickCatalogEventRuntimeDownloading
withExpected(long value)
Copy the current immutable object by setting a value for theexpected
attribute.CoffeePickCatalogEventRuntimeDownloading
withId(java.lang.String value)
Copy the current immutable object by setting a value for theid
attribute.CoffeePickCatalogEventRuntimeDownloading
withOctetsPerSecond(double value)
Copy the current immutable object by setting a value for theoctetsPerSecond
attribute.CoffeePickCatalogEventRuntimeDownloading
withReceived(long value)
Copy the current immutable object by setting a value for thereceived
attribute.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 Details
-
id
public java.lang.String id()- Specified by:
id
in interfaceCoffeePickCatalogEventRuntimeDownloadingType
- Returns:
- The ID of the runtime
-
octetsPerSecond
public double octetsPerSecond()- Specified by:
octetsPerSecond
in interfaceCoffeePickCatalogEventRuntimeDownloadingType
- Returns:
- The number of octets being received per second
-
expected
public long expected()- Specified by:
expected
in interfaceCoffeePickCatalogEventRuntimeDownloadingType
- Returns:
- The number of octets expected
-
received
public long received()- Specified by:
received
in interfaceCoffeePickCatalogEventRuntimeDownloadingType
- Returns:
- The number of octets that have been received
-
withId
Copy the current immutable object by setting a value for theid
attribute. 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
this
object
-
withOctetsPerSecond
Copy the current immutable object by setting a value for theoctetsPerSecond
attribute. 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
this
object
-
withExpected
Copy the current immutable object by setting a value for theexpected
attribute. 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
this
object
-
withReceived
Copy the current immutable object by setting a value for thereceived
attribute. 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
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofCoffeePickCatalogEventRuntimeDownloading
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()Computes a hash code from attributes:id
,octetsPerSecond
,expected
,received
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueCoffeePickCatalogEventRuntimeDownloading
with attribute values.- Overrides:
toString
in 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 immutableCoffeePickCatalogEventRuntimeDownloading
instance.- Parameters:
id
- The value for theid
attributeoctetsPerSecond
- The value for theoctetsPerSecond
attributeexpected
- The value for theexpected
attributereceived
- The value for thereceived
attribute- Returns:
- An immutable CoffeePickCatalogEventRuntimeDownloading instance
-
copyOf
public static CoffeePickCatalogEventRuntimeDownloading copyOf(CoffeePickCatalogEventRuntimeDownloadingType instance)Creates an immutable copy of aCoffeePickCatalogEventRuntimeDownloadingType
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 forCoffeePickCatalogEventRuntimeDownloading
.CoffeePickCatalogEventRuntimeDownloading.builder() .setId(String) // required
id
.setOctetsPerSecond(double) // requiredoctetsPerSecond
.setExpected(long) // requiredexpected
.setReceived(long) // requiredreceived
.build();- Returns:
- A new CoffeePickCatalogEventRuntimeDownloading builder
-