Discovery.uris(String, URI) method.
A DiscoveredUri implementation must be immutable in all possible respects.
Equality
Two DiscoveredUri implementations are considered equal if and only if:
- The return values of invocations of their
getClass()methods are equal, and - The return values of invocations of their
uri()methods are equal
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()Returns a determinate hashcode for thisDiscoveredUri.metadata()Returns a determinate, immutableMapof metadata further describing thisDiscoveredUriimplementation.uri()Returns the non-null, determinateURIcomponent of thisDiscoveredUrithat it fundamentally represents.
-
Method Details
-
equals
Returnstrueif and only if the suppliedObjectis equal to thisDiscoveredUri.For implementations of this method to return
true, the suppliedObject:- Must have a
Classthat is equal to thisDiscoveredUri'sClass, and - Must have a
URIequal to thisDiscoveredUri'sURI
Implementations of this method must return determinate values.
Note: This specification notably and deliberately excludes metadata from equality calculations.
- Overrides:
equalsin classObject- Parameters:
other- anObjectto test; may benullin which casefalsemust be returned- Returns:
trueif and only if the suppliedObjectis equal to thisDiscoveredUri- See Also:
- Must have a
-
hashCode
int hashCode()Returns a determinate hashcode for thisDiscoveredUri.Implementations of this method must compute a hashcode based only on the return value of an invocation of the
uri()method.- Overrides:
hashCodein classObject- Returns:
- a determinate hashcode for this
DiscoveredUri - See Also:
-
metadata
Returns a determinate, immutableMapof metadata further describing thisDiscoveredUriimplementation.Keys in
Maps returned by invocations of implementations of this method that begin with the prefixio.helidon.discovery.are reserved for internal use by implementations.The default implementation returns the return value of an invocation of the
Map.of()method, indicating that by default there is no metadata associated with aDiscoveredUri. Overrides are expected and encouraged.Note: The return value of invocations of implementations of this method must be excluded from hashcode and equality calculations.
- Returns:
- a non-
null, immutableMapof metadata - See Also:
-
uri
URI uri()Returns the non-null, determinateURIcomponent of thisDiscoveredUrithat it fundamentally represents.- Returns:
- a non-
null, determinateURIthat thisDiscoveredUrifundamentally represents
-