本文整理汇总了Java中it.unimi.dsi.fastutil.longs.Long2ObjectSortedMap类的典型用法代码示例。如果您正苦于以下问题:Java Long2ObjectSortedMap类的具体用法?Java Long2ObjectSortedMap怎么用?Java Long2ObjectSortedMap使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Long2ObjectSortedMap类属于it.unimi.dsi.fastutil.longs包,在下文中一共展示了Long2ObjectSortedMap类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: subMap
import it.unimi.dsi.fastutil.longs.Long2ObjectSortedMap; //导入依赖的package包/类
public Long2ObjectSortedMap<V> subMap(long from, long to) {
if (top && bottom)
return new Submap(from, false, to, false);
if (!top)
to = compare(to, this.to) < 0 ? to : this.to;
if (!bottom)
from = compare(from, this.from) > 0 ? from : this.from;
if (!top && !bottom && from == this.from && to == this.to)
return this;
return new Submap(from, false, to, false);
}
示例2: atLeast
import it.unimi.dsi.fastutil.longs.Long2ObjectSortedMap; //导入依赖的package包/类
public Selection atLeast(long value) {
Selection selection = new BitmapBackedSelection();
Long2ObjectSortedMap<IntArrayList> tail = index.tailMap(value);
for (IntArrayList keys : tail.values()) {
addAllToSelection(keys, selection);
}
return selection;
}
示例3: greaterThan
import it.unimi.dsi.fastutil.longs.Long2ObjectSortedMap; //导入依赖的package包/类
public Selection greaterThan(long value) {
Selection selection = new BitmapBackedSelection();
Long2ObjectSortedMap<IntArrayList> tail = index.tailMap(value + 1);
for (IntArrayList keys : tail.values()) {
addAllToSelection(keys, selection);
}
return selection;
}
示例4: atMost
import it.unimi.dsi.fastutil.longs.Long2ObjectSortedMap; //导入依赖的package包/类
public Selection atMost(long value) {
Selection selection = new BitmapBackedSelection();
Long2ObjectSortedMap<IntArrayList> head = index.headMap(value + 1); // we add 1 to get values equal to the arg
for (IntArrayList keys : head.values()) {
addAllToSelection(keys, selection);
}
return selection;
}
示例5: lessThan
import it.unimi.dsi.fastutil.longs.Long2ObjectSortedMap; //导入依赖的package包/类
public Selection lessThan(long value) {
Selection selection = new BitmapBackedSelection();
Long2ObjectSortedMap<IntArrayList> head = index.headMap(value); // we add 1 to get values equal to the arg
for (IntArrayList keys : head.values()) {
addAllToSelection(keys, selection);
}
return selection;
}
示例6: headMap
import it.unimi.dsi.fastutil.longs.Long2ObjectSortedMap; //导入依赖的package包/类
public Long2ObjectSortedMap<V> headMap(long to) {
return new Submap((0), true, to, false);
}
示例7: tailMap
import it.unimi.dsi.fastutil.longs.Long2ObjectSortedMap; //导入依赖的package包/类
public Long2ObjectSortedMap<V> tailMap(long from) {
return new Submap(from, false, (0), true);
}
示例8: Long2ObjectRBNavigableMap
import it.unimi.dsi.fastutil.longs.Long2ObjectSortedMap; //导入依赖的package包/类
/**
* Creates a new tree map copying a given sorted map (and its
* {@link Comparator}).
*
* @param m
* a type-specific sorted map to be copied into the new tree map.
*/
public Long2ObjectRBNavigableMap(final Long2ObjectSortedMap<V> m) {
this(m.comparator());
putAll(m);
}