T - Type of nodespublic class Neighbor<T> extends Object implements Comparable, Serializable
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object other)
This > other if this.similarity > other.similarity.
|
boolean |
equals(Object other)
A neighbor has no reference to the origin node, hence only neighbors
from the same origin can be compared.
|
T |
getNode() |
double |
getSimilarity() |
int |
hashCode() |
String |
toString() |
public Neighbor(T node, double similarity)
node - similarity - public final T getNode()
public final double getSimilarity()
public final String toString()
public final boolean equals(Object other)
public final int compareTo(Object other)
compareTo in interface Comparableother - Copyright © 2017. All rights reserved.