Class RuntimeRepositoryProviderRegistryEvent
java.lang.Object
com.io7m.coffeepick.repository.spi.RuntimeRepositoryProviderRegistryEvent
- All Implemented Interfaces:
RuntimeRepositoryProviderRegistryEventType
public final class RuntimeRepositoryProviderRegistryEvent extends java.lang.Object implements RuntimeRepositoryProviderRegistryEventType
The repository registry changed.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RuntimeRepositoryProviderRegistryEvent.Builder
Builds instances of typeRuntimeRepositoryProviderRegistryEvent
.Nested classes/interfaces inherited from interface com.io7m.coffeepick.repository.spi.RuntimeRepositoryProviderRegistryEventType
RuntimeRepositoryProviderRegistryEventType.Change
-
Method Summary
Modifier and Type Method Description static RuntimeRepositoryProviderRegistryEvent.Builder
builder()
Creates a builder forRuntimeRepositoryProviderRegistryEvent
.RuntimeRepositoryProviderRegistryEventType.Change
change()
static RuntimeRepositoryProviderRegistryEvent
copyOf(RuntimeRepositoryProviderRegistryEventType instance)
Creates an immutable copy of aRuntimeRepositoryProviderRegistryEventType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofRuntimeRepositoryProviderRegistryEvent
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:change
,repositoryProvider
.static RuntimeRepositoryProviderRegistryEvent
of(RuntimeRepositoryProviderRegistryEventType.Change change, RuntimeRepositoryProviderType repositoryProvider)
Construct a new immutableRuntimeRepositoryProviderRegistryEvent
instance.RuntimeRepositoryProviderType
repositoryProvider()
java.lang.String
toString()
Prints the immutable valueRuntimeRepositoryProviderRegistryEvent
with attribute values.RuntimeRepositoryProviderRegistryEvent
withChange(RuntimeRepositoryProviderRegistryEventType.Change value)
Copy the current immutable object by setting a value for thechange
attribute.RuntimeRepositoryProviderRegistryEvent
withRepositoryProvider(RuntimeRepositoryProviderType value)
Copy the current immutable object by setting a value for therepositoryProvider
attribute.
-
Method Details
-
change
- Specified by:
change
in interfaceRuntimeRepositoryProviderRegistryEventType
- Returns:
- The type of change
-
repositoryProvider
- Specified by:
repositoryProvider
in interfaceRuntimeRepositoryProviderRegistryEventType
- Returns:
- The repository provider
-
withChange
public final RuntimeRepositoryProviderRegistryEvent withChange(RuntimeRepositoryProviderRegistryEventType.Change value)Copy the current immutable object by setting a value for thechange
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for change- Returns:
- A modified copy of the
this
object
-
withRepositoryProvider
public final RuntimeRepositoryProviderRegistryEvent withRepositoryProvider(RuntimeRepositoryProviderType value)Copy the current immutable object by setting a value for therepositoryProvider
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for repositoryProvider- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofRuntimeRepositoryProviderRegistryEvent
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:change
,repositoryProvider
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueRuntimeRepositoryProviderRegistryEvent
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
of
public static RuntimeRepositoryProviderRegistryEvent of(RuntimeRepositoryProviderRegistryEventType.Change change, RuntimeRepositoryProviderType repositoryProvider)Construct a new immutableRuntimeRepositoryProviderRegistryEvent
instance.- Parameters:
change
- The value for thechange
attributerepositoryProvider
- The value for therepositoryProvider
attribute- Returns:
- An immutable RuntimeRepositoryProviderRegistryEvent instance
-
copyOf
public static RuntimeRepositoryProviderRegistryEvent copyOf(RuntimeRepositoryProviderRegistryEventType instance)Creates an immutable copy of aRuntimeRepositoryProviderRegistryEventType
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 RuntimeRepositoryProviderRegistryEvent instance
-
builder
Creates a builder forRuntimeRepositoryProviderRegistryEvent
.RuntimeRepositoryProviderRegistryEvent.builder() .setChange(com.io7m.coffeepick.repository.spi.RuntimeRepositoryProviderRegistryEventType.Change) // required
change
.setRepositoryProvider(com.io7m.coffeepick.repository.spi.RuntimeRepositoryProviderType) // requiredrepositoryProvider
.build();- Returns:
- A new RuntimeRepositoryProviderRegistryEvent builder
-