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 classRuntimeRepositoryProviderRegistryEvent.BuilderBuilds 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.Builderbuilder()Creates a builder forRuntimeRepositoryProviderRegistryEvent.RuntimeRepositoryProviderRegistryEventType.Changechange()static RuntimeRepositoryProviderRegistryEventcopyOf(RuntimeRepositoryProviderRegistryEventType instance)Creates an immutable copy of aRuntimeRepositoryProviderRegistryEventTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofRuntimeRepositoryProviderRegistryEventthat have equal attribute values.inthashCode()Computes a hash code from attributes:change,repositoryProvider.static RuntimeRepositoryProviderRegistryEventof(RuntimeRepositoryProviderRegistryEventType.Change change, RuntimeRepositoryProviderType repositoryProvider)Construct a new immutableRuntimeRepositoryProviderRegistryEventinstance.RuntimeRepositoryProviderTyperepositoryProvider()java.lang.StringtoString()Prints the immutable valueRuntimeRepositoryProviderRegistryEventwith attribute values.RuntimeRepositoryProviderRegistryEventwithChange(RuntimeRepositoryProviderRegistryEventType.Change value)Copy the current immutable object by setting a value for thechangeattribute.RuntimeRepositoryProviderRegistryEventwithRepositoryProvider(RuntimeRepositoryProviderType value)Copy the current immutable object by setting a value for therepositoryProviderattribute.
-
Method Details
-
change
- Specified by:
changein interfaceRuntimeRepositoryProviderRegistryEventType- Returns:
- The type of change
-
repositoryProvider
- Specified by:
repositoryProviderin interfaceRuntimeRepositoryProviderRegistryEventType- Returns:
- The repository provider
-
withChange
public final RuntimeRepositoryProviderRegistryEvent withChange(RuntimeRepositoryProviderRegistryEventType.Change value)Copy the current immutable object by setting a value for thechangeattribute. 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
thisobject
-
withRepositoryProvider
public final RuntimeRepositoryProviderRegistryEvent withRepositoryProvider(RuntimeRepositoryProviderType value)Copy the current immutable object by setting a value for therepositoryProviderattribute. 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
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofRuntimeRepositoryProviderRegistryEventthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:change,repositoryProvider.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueRuntimeRepositoryProviderRegistryEventwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
public static RuntimeRepositoryProviderRegistryEvent of(RuntimeRepositoryProviderRegistryEventType.Change change, RuntimeRepositoryProviderType repositoryProvider)Construct a new immutableRuntimeRepositoryProviderRegistryEventinstance.- Parameters:
change- The value for thechangeattributerepositoryProvider- The value for therepositoryProviderattribute- Returns:
- An immutable RuntimeRepositoryProviderRegistryEvent instance
-
copyOf
public static RuntimeRepositoryProviderRegistryEvent copyOf(RuntimeRepositoryProviderRegistryEventType instance)Creates an immutable copy of aRuntimeRepositoryProviderRegistryEventTypevalue. 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) // requiredchange.setRepositoryProvider(com.io7m.coffeepick.repository.spi.RuntimeRepositoryProviderType) // requiredrepositoryProvider.build();- Returns:
- A new RuntimeRepositoryProviderRegistryEvent builder
-