本文整理匯總了Java中com.thinkaurelius.titan.core.VertexList類的典型用法代碼示例。如果您正苦於以下問題:Java VertexList類的具體用法?Java VertexList怎麽用?Java VertexList使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
VertexList類屬於com.thinkaurelius.titan.core包,在下文中一共展示了VertexList類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: subList
import com.thinkaurelius.titan.core.VertexList; //導入依賴的package包/類
@Override
public VertexList subList(int fromPosition, int length) {
LongArrayList subList = new LongArrayList(length);
subList.add(vertices.buffer, fromPosition, length);
assert subList.size()==length;
return new VertexLongList(tx,subList,sorted);
}
示例2: addAll
import com.thinkaurelius.titan.core.VertexList; //導入依賴的package包/類
@Override
public void addAll(VertexList vertexlist) {
Preconditions.checkArgument(vertexlist instanceof VertexArrayList, "Only supporting union of identical lists.");
VertexArrayList other = (vertexlist instanceof VertexArrayList)?(VertexArrayList)vertexlist:
((VertexLongList)vertexlist).toVertexArrayList();
if (sorted && other.isSorted()) {
//Merge sort
vertices = (ArrayList)IterablesUtil.mergeSort(vertices, other.vertices, VERTEX_ID_COMPARATOR);
} else {
sorted = false;
vertices.addAll(other.vertices);
}
}
示例3: isSortedByID
import com.thinkaurelius.titan.core.VertexList; //導入依賴的package包/類
private boolean isSortedByID(VertexList vl) {
for (int i = 1; i < vl.size(); i++) {
if (vl.getID(i - 1) > vl.getID(i)) return false;
}
return true;
}
示例4: subList
import com.thinkaurelius.titan.core.VertexList; //導入依賴的package包/類
@Override
public VertexList subList(int fromPosition, int length) {
return new VertexArrayList(tx,vertices.subList(fromPosition,fromPosition+length),sorted);
}
示例5: addAll
import com.thinkaurelius.titan.core.VertexList; //導入依賴的package包/類
/**
* Copies all vertices in the given vertex list into this list.
*
* @param vertices
*/
public void addAll(VertexList vertices);