示例#1
0
  public UniqueSearchIndex(Class<?> keyType, List<ITEM> items, Function<ITEM, KEY> keyGetter) {
    super(keyType);
    super.keyGetter = keyGetter;
    super.map = SPIFactory.getMapCreatorFactory().get().createMap(keyType);

    this.navigableMap = (NavigableMap<KEY, ITEM>) super.map;

    for (ITEM item : items) {
      add(item);
    }
  }
示例#2
0
  @Override
  public void init() {
    super.map = SPIFactory.getMapCreatorFactory().get().createNavigableMap(keyType, collator);

    this.navigableMap = (NavigableMap<KEY, ITEM>) super.map;
  }