public static final class ModuleDescriptor.Requires extends Object implements Comparable<ModuleDescriptor.Requires>
A dependence upon a module
ModuleDescriptor.requires()| Modifier and Type | Class and Description |
|---|---|
static class |
ModuleDescriptor.Requires.Modifier
A modifier on a module dependence.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ModuleDescriptor.Requires that)
Compares this module dependence to another.
|
boolean |
equals(Object ob)
Tests this module dependence for equality with the given object.
|
int |
hashCode()
Computes a hash code for this module dependence.
|
Set<ModuleDescriptor.Requires.Modifier> |
modifiers()
Returns the set of modifiers.
|
String |
name()
Return the module name.
|
String |
toString()
Returns a string describing module dependence.
|
public Set<ModuleDescriptor.Requires.Modifier> modifiers()
public String name()
public int compareTo(ModuleDescriptor.Requires that)
Two Requires objects are compared by comparing their
module name lexicographically. Where the module names are equal then
the sets of modifiers are compared based on a value computed from the
ordinal of each modifier.
compareTo in interface Comparable<ModuleDescriptor.Requires>that - the object to be compared.public boolean equals(Object ob)
If the given object is not a Requires then this method
returns false. Two module dependence objects are equal if
the module names are equal and set of modifiers are equal.
This method satisfies the general contract of the Object.equals method.
equals in class Objectob - the object to which this object is to be comparedtrue if, and only if, the given object is a module
dependence that is equal to this module dependenceObject.hashCode(),
HashMappublic int hashCode()
The hash code is based upon the module name and modifiers. It
satisfies the general contract of the Object.hashCode method.
hashCode in class ObjectObject.equals(java.lang.Object),
System.identityHashCode(java.lang.Object) Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-04-14-195246.buildd.src