Package Summary Overview Summary |
java.lang.Comparable<ModuleDescriptor.Provides>
public static final class ModuleDescriptor.Provides extends java.lang.Object implements java.lang.Comparable<ModuleDescriptor.Provides>
A service that a module provides one or more implementations of.
ModuleDescriptor.provides()
Modifier and Type | Method | Description |
---|---|---|
int | compareTo(ModuleDescriptor.Provides that) |
Compares this provides to another.
|
boolean | equals(java.lang.Object ob) |
Tests this provides for equality with the given object.
|
int | hashCode() |
Computes a hash code for this provides.
|
java.util.List<java.lang.String> | providers() |
Returns the list of the fully qualified class names of the providers or provider factories.
|
java.lang.String | service() |
Returns the fully qualified class name of the service type.
|
java.lang.String | toString() |
Returns a string describing this provides.
|
public java.lang.String service()
public java.util.List<java.lang.String> providers()
public int compareTo(ModuleDescriptor.Provides that)
Two Provides
objects are compared by comparing the fully qualified class name of the service type lexicographically. Where the class names are equal then the list of the provider class names are compared by comparing the corresponding elements of both lists lexicographically and in sequence. Where the lists differ in size, N
is the size of the shorter list, and the first N
corresponding elements are equal, then the longer list is considered to succeed the shorter list.
compareTo
in interface java.lang.Comparable<ModuleDescriptor.Provides>
that
- The Provides
to compare public int hashCode()
The hash code is based upon the service type and the set of providers. It satisfies the general contract of the Object.hashCode
method.
hashCode
in class java.lang.Object
Object.equals(java.lang.Object)
, System.identityHashCode(java.lang.Object)
public boolean equals(java.lang.Object ob)
If the given object is not a Provides
then this method returns false
. Two Provides
objects are equal if the service type is equal and the list of providers is equal.
This method satisfies the general contract of the Object.equals
method.
equals
in class java.lang.Object
ob
- the object to which this object is to be compared true
if, and only if, the given object is a Provides
that is equal to this Provides
Object.hashCode()
, HashMap
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 1993, 2017, Oracle and/or its affiliates · All rights reserved · License