java.util.concurrent.ConcurrentSkipListSet.subSet()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中java.util.concurrent.ConcurrentSkipListSet.subSet()方法的一些代码示例,展示了ConcurrentSkipListSet.subSet()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ConcurrentSkipListSet.subSet()方法的具体详情如下:
包路径:java.util.concurrent.ConcurrentSkipListSet
类名称:ConcurrentSkipListSet
方法名:subSet

ConcurrentSkipListSet.subSet介绍

暂无

代码示例

代码示例来源:origin: robovm/robovm

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} or
 *         {@code toElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> subSet(E fromElement, E toElement) {
  return subSet(fromElement, true, toElement, false);
}

代码示例来源:origin: MobiVM/robovm

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} or
 *         {@code toElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> subSet(E fromElement, E toElement) {
  return subSet(fromElement, true, toElement, false);
}

代码示例来源:origin: ibinti/bugvm

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} or
 *         {@code toElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> subSet(E fromElement, E toElement) {
  return subSet(fromElement, true, toElement, false);
}

代码示例来源:origin: org.apidesign.bck2brwsr/emul

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} or
 *         {@code toElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> subSet(E fromElement, E toElement) {
  return subSet(fromElement, true, toElement, false);
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} or
 *         {@code toElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> subSet(E fromElement, E toElement) {
  return subSet(fromElement, true, toElement, false);
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} or
 *         {@code toElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> subSet(E fromElement, E toElement) {
  return subSet(fromElement, true, toElement, false);
}

代码示例来源:origin: de.dentrassi.eclipse.neoscada.utils/org.eclipse.scada.utils

@Override
public SortedSet<E> subSet ( final E fromElement, final E toElement )
{
  return this.internalSet.subSet ( fromElement, toElement );
}

代码示例来源:origin: jtulach/bck2brwsr

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} or
 *         {@code toElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> subSet(E fromElement, E toElement) {
  return subSet(fromElement, true, toElement, false);
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} or
 *         {@code toElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> subSet(E fromElement, E toElement) {
  return subSet(fromElement, true, toElement, false);
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} or
 *         {@code toElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> subSet(E fromElement, E toElement) {
  return subSet(fromElement, true, toElement, false);
}

代码示例来源:origin: org.codehaus.jsr166-mirror/jsr166

/**
 * @throws ClassCastException {@inheritDoc}
 * @throws NullPointerException if {@code fromElement} or
 *         {@code toElement} is null
 * @throws IllegalArgumentException {@inheritDoc}
 */
public NavigableSet<E> subSet(E fromElement, E toElement) {
  return subSet(fromElement, true, toElement, false);
}

代码示例来源:origin: com.jtransc/jtransc-rt

public NavigableSet<E> subSet(E fromElement, E toElement) {
  return subSet(fromElement, true, toElement, false);
}

代码示例来源:origin: org.apache.gora/gora-jcache

@Override
public Result<K, T> execute(Query<K, T> query) {
 K startKey = query.getStartKey();
 K endKey = query.getEndKey();
 if (startKey == null) {
  if (!cacheEntryList.isEmpty()) {
   startKey = (K) cacheEntryList.first();
  }
 }
 if (endKey == null) {
  if (!cacheEntryList.isEmpty()) {
   endKey = (K) cacheEntryList.last();
  }
 }
 query.setFields(getFieldsToQuery(query.getFields()));
 ConcurrentSkipListSet<K> cacheEntrySubList = null;
 try {
  cacheEntrySubList = (ConcurrentSkipListSet<K>) cacheEntryList.subSet(startKey, true, endKey, true);
 } catch (NullPointerException npe) {
  LOG.error("NPE occurred while executing the query for JCacheStore. Hence returning empty entry set.", npe);
  return new JCacheResult<>(this, query, new ConcurrentSkipListSet<K>());
 }
 return new JCacheResult<>(this, query, cacheEntrySubList);
}

代码示例来源:origin: cojen/Tupl

@Override
public void queryTerms(long startIndex, long endIndex, TermQuery results) {
  if (startIndex >= endIndex) {
    return;
  }
  LKey<TermLog> startKey = new LKey.Finder<>(startIndex);
  LKey<TermLog> endKey = new LKey.Finder<>(endIndex);
  LKey<TermLog> prev = mTermLogs.floor(startKey); // findLe
  if (prev != null && ((TermLog) prev).endIndex() > startIndex) {
    startKey = prev;
  }
  for (Object key : mTermLogs.subSet(startKey, endKey)) {
    TermLog termLog = (TermLog) key;
    results.term(termLog.prevTerm(), termLog.term(), termLog.startIndex());
  }
}

代码示例来源:origin: apache/gora

@Override
public Result<K, T> execute(Query<K, T> query) throws GoraException {
 K startKey = query.getStartKey();
 K endKey = query.getEndKey();
 if (startKey == null) {
  if (!cacheEntryList.isEmpty()) {
   startKey = (K) cacheEntryList.first();
  }
 }
 if (endKey == null) {
  if (!cacheEntryList.isEmpty()) {
   endKey = (K) cacheEntryList.last();
  }
 }
 query.setFields(getFieldsToQuery(query.getFields()));
 
 NavigableSet<K> cacheEntrySubList = null;
 if (startKey != null && endKey != null) {
  try {
   cacheEntrySubList =  cacheEntryList.subSet(startKey, true, endKey, true);
  } catch (Exception e) {
   throw new GoraException(e);
  }
 } else {
  // Empty
  cacheEntrySubList = Collections.emptyNavigableSet() ;
 }
 
 return new JCacheResult<>(this, query, cacheEntrySubList);
}

相关文章

微信公众号

最新文章

更多