本文整理了Java中java.util.LinkedHashSet.clear()
方法的一些代码示例,展示了LinkedHashSet.clear()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LinkedHashSet.clear()
方法的具体详情如下:
包路径:java.util.LinkedHashSet
类名称:LinkedHashSet
方法名:clear
暂无
代码示例来源:origin: hibernate/hibernate-orm
/**
* Package-protected access to clear registered synchronizations.
*/
void clearSynchronizations() {
if ( synchronizations != null ) {
synchronizations.clear();
synchronizations = null;
}
}
}
代码示例来源:origin: square/leakcanary
private void clearState() {
toVisitQueue.clear();
toVisitIfNoPathQueue.clear();
toVisitSet.clear();
toVisitIfNoPathSet.clear();
visitedSet.clear();
}
代码示例来源:origin: thymeleaf/thymeleaf
public void clearPatterns() {
if (this.patterns != null) {
this.patternStrs.clear();
this.patterns.clear();
}
}
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public void clear() {
delegate.clear();
}
代码示例来源:origin: spotbugs/spotbugs
public void clearErrors() {
errorList.clear();
}
代码示例来源:origin: spotbugs/spotbugs
protected void clear() {
children.clear();
}
代码示例来源:origin: requery/requery
@Override
public void clear() {
super.clear();
types.clear();
}
代码示例来源:origin: apache/activemq
public void clear() {
for (int i = 0; i <= maxFrequency; i++) {
frequencyList[i].clear();
}
cache.clear();
lowestFrequency = 0;
}
代码示例来源:origin: org.assertj/assertj-core
/**
* Remove all registered custom date formats => use only the defaults date formats to parse string as date.
* <p>
* Beware that the default formats are expressed in the current local timezone.
* <p>
* Defaults date format (expressed in the local time zone) are :
* <ul>
* <li><code>yyyy-MM-dd'T'HH:mm:ss.SSS</code></li>
* <li><code>yyyy-MM-dd HH:mm:ss.SSS</code></li>
* <li><code>yyyy-MM-dd'T'HH:mm:ss</code></li>
* <li><code>yyyy-MM-dd</code></li>
* </ul>
* <p>
* Example of valid string date representations:
* <ul>
* <li><code>2003-04-26T03:01:02.999</code></li>
* <li><code>2003-04-26 03:01:02.999</code></li>
* <li><code>2003-04-26T13:01:02</code></li>
* <li><code>2003-04-26</code></li>
* </ul>
*/
public static void useDefaultDateFormatsOnly() {
userDateFormats.get().clear();
}
代码示例来源:origin: apache/incubator-druid
private void resolveWaitingFutures()
{
LinkedHashSet<CustomSettableFuture> waitingFuturesCopy = new LinkedHashSet<>();
synchronized (waitingFutures) {
waitingFuturesCopy.addAll(waitingFutures);
waitingFutures.clear();
}
for (CustomSettableFuture future : waitingFuturesCopy) {
future.resolve();
}
}
代码示例来源:origin: hibernate/hibernate-orm
@Override
public void clearSynchronizations() {
log.debug( "Clearing local Synchronizations" );
if ( synchronizations != null ) {
synchronizations.clear();
}
}
}
代码示例来源:origin: thymeleaf/thymeleaf
public void setPatterns(final Set<String> newPatterns) {
if (newPatterns != null) {
if (this.patterns == null) {
this.patternStrs = new LinkedHashSet<String>(DEFAULT_PATTERN_SET_SIZE);
this.patterns = new LinkedHashSet<Pattern>(DEFAULT_PATTERN_SET_SIZE);
} else {
this.patternStrs.clear();
this.patterns.clear();
}
this.patternStrs.addAll(newPatterns);
for (final String pattern : newPatterns) {
this.patterns.add(PatternUtils.strPatternToPattern(pattern));
}
} else if (this.patterns != null) {
this.patternStrs.clear();
this.patterns.clear();
}
}
代码示例来源:origin: joel-costigliola/assertj-core
/**
* Remove all registered custom date formats => use only the defaults date formats to parse string as date.
* <p>
* Beware that the default formats are expressed in the current local timezone.
* <p>
* Defaults date format (expressed in the local time zone) are :
* <ul>
* <li><code>yyyy-MM-dd'T'HH:mm:ss.SSS</code></li>
* <li><code>yyyy-MM-dd HH:mm:ss.SSS</code></li>
* <li><code>yyyy-MM-dd'T'HH:mm:ss</code></li>
* <li><code>yyyy-MM-dd</code></li>
* </ul>
* <p>
* Example of valid string date representations:
* <ul>
* <li><code>2003-04-26T03:01:02.999</code></li>
* <li><code>2003-04-26 03:01:02.999</code></li>
* <li><code>2003-04-26T13:01:02</code></li>
* <li><code>2003-04-26</code></li>
* </ul>
*/
public static void useDefaultDateFormatsOnly() {
userDateFormats.get().clear();
}
代码示例来源:origin: loklak/loklak_server
public void clear() {
this.set.clear();
this.stats.clear();
}
代码示例来源:origin: Atmosphere/atmosphere
while (!pushBackInjection.isEmpty() & maxTryPerCycle-- > 0) {
Iterator<Object> t = new LinkedList(pushBackInjection).iterator();
pushBackInjection.clear();
while (t.hasNext()) {
instance = t.next();
代码示例来源:origin: hibernate/hibernate-orm
@Override
public void release() {
if ( getStatements() != null && !getStatements().isEmpty() ) {
LOG.batchContainedStatementsOnRelease();
}
releaseStatements();
observers.clear();
}
}
代码示例来源:origin: DozerMapper/dozer
result.clear();
result.addAll(mappedElements);
代码示例来源:origin: spotbugs/spotbugs
if (d.priority >= Priorities.LOW_PRIORITY) {
reportBug(bug, d);
d.allSource.clear();
代码示例来源:origin: azkaban/azkaban
public static Props resolveProps(final Props props) {
if (props == null) {
return null;
}
final Props resolvedProps = new Props();
final LinkedHashSet<String> visitedVariables = new LinkedHashSet<>();
for (final String key : props.getKeySet()) {
String value = props.get(key);
if (value == null) {
logger.warn("Null value in props for key '" + key + "'. Replacing with empty string.");
value = "";
}
visitedVariables.add(key);
final String replacedValue =
resolveVariableReplacement(value, props, visitedVariables);
visitedVariables.clear();
resolvedProps.put(key, replacedValue);
}
for (final String key : resolvedProps.getKeySet()) {
final String value = resolvedProps.get(key);
final String expressedValue = resolveVariableExpression(value);
resolvedProps.put(key, expressedValue);
}
return resolvedProps;
}
代码示例来源:origin: apache/hive
correlatedReduceSinkOperators.addAll(correlatedRsops);
} else {
correlatedReduceSinkOperators.clear();
LOG.info("Operator " + current.getIdentifier() + " " +
current.getName() + " is not correlated");
correlatedReduceSinkOperators.clear();
内容来源于网络,如有侵权,请联系作者删除!