C
- The type of Artifact interface that the Artifact can be compared
to.public abstract class Artifact<C extends Artifact<C>> extends Object implements Comparable<Artifact<?>>, Serializable
Modifier | Constructor and Description |
---|---|
protected |
Artifact(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(Object obj)
Delegates to
compareTo(Artifact) . |
protected abstract Class<C> |
getComparableArtifactType()
Returns the base type to use for comparisons between Artifacts.
|
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. |
String |
toString() |
public final int compareTo(Artifact<?> o)
compareTo
in interface Comparable<Artifact<?>>
public final boolean equals(Object obj)
compareTo(Artifact)
.public final 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.public final boolean isTransferableFromShards()
Transferable
annotation is present on this
class. See Transferable
for the implications.protected abstract int compareToComparableArtifact(C o)
hashCode()
.Copyright © 2018. All rights reserved.