C
- The type of Artifact interface that the Artifact can be compared
to.public abstract class Artifact<C extends Artifact<C>> extends java.lang.Object implements java.lang.Comparable<Artifact<?>>, java.io.Serializable
Modifier | Constructor and Description |
---|---|
protected |
Artifact(java.lang.Class<? extends Linker> linker)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Artifact<?> o) |
protected abstract int |
compareToComparableArtifact(C o)
Performs comparison with an artifact of a compatible base type.
|
boolean |
equals(java.lang.Object obj)
Delegates to
compareTo(Artifact) . |
protected abstract java.lang.Class<C> |
getComparableArtifactType()
Returns the base type to use for comparisons between Artifacts.
|
java.lang.Class<? extends Linker> |
getLinker()
Returns the Linker that created the Artifact.
|
abstract int |
hashCode()
The class which is returned from
getComparableArtifactType() must
declare a final implementation which returns the same hash code for objects
for which compareToComparableArtifact(Artifact) returns 0. |
boolean |
isTransferableFromShards()
Returns whether the
Transferable annotation is present on this
class. |
java.lang.String |
toString() |
protected Artifact(java.lang.Class<? extends Linker> linker)
linker
- the type of Linker that instantiated the Artifact.public final int compareTo(Artifact<?> o)
compareTo
in interface java.lang.Comparable<Artifact<?>>
public final boolean equals(java.lang.Object obj)
compareTo(Artifact)
.equals
in class java.lang.Object
public final java.lang.Class<? extends Linker> getLinker()
public abstract int hashCode()
getComparableArtifactType()
must
declare a final implementation which returns the same hash code for objects
for which compareToComparableArtifact(Artifact)
returns 0.hashCode
in class java.lang.Object
public final boolean isTransferableFromShards()
Transferable
annotation is present on this
class. See Transferable
for the implications.public java.lang.String toString()
toString
in class java.lang.Object
protected abstract int compareToComparableArtifact(C o)
hashCode()
.protected abstract java.lang.Class<C> getComparableArtifactType()