Package org.eclipse.aether.named
Class NamedLockKey
- java.lang.Object
-
- org.eclipse.aether.named.NamedLockKey
-
public final class NamedLockKey extends java.lang.Object
A named lock key.Instances of this class are immutable, implement hash/equals and toString method (for easier debug).
- Since:
- 2.0.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()java.lang.Stringname()Returns this key name, nevernull.static NamedLockKeyof(java.lang.String name, java.lang.String... resources)static NamedLockKeyof(java.lang.String name, java.util.Collection<java.lang.String> resources)java.util.Collection<java.lang.String>resources()Auxiliary information, not used by Resolver.java.lang.StringtoString()
-
-
-
Method Detail
-
name
public java.lang.String name()
Returns this key name, nevernull. This is the identity of this lock key instance and is the only thing that is used in implementations of hash/equals, etc.
-
resources
public java.util.Collection<java.lang.String> resources()
Auxiliary information, not used by Resolver. Meant to return resource name(s) or any kind of identifiers protected by this key, nevernull.Contents on this field is consumer project specific, and should be used only as "extra information": resolver itself uses these only for logging purposes.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
of
public static NamedLockKey of(java.lang.String name, java.lang.String... resources)
-
of
public static NamedLockKey of(java.lang.String name, java.util.Collection<java.lang.String> resources)
-
-