本文整理汇总了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);