java.util.Hashtable.isEmpty()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(119)

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

Hashtable.isEmpty介绍

[英]Returns true if this Hashtable has no key/value pairs.
[中]如果此哈希表没有键/值对,则返回true。

代码示例

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

/**
 * Get whether all required elements were found.
 *
 * @return true if all required elements were found.
 */
boolean getRequiredFound()
{
   if (m_requiredFound == null)
     return true;
 return m_requiredFound.isEmpty();
}

代码示例来源:origin: javax.activation/activation

/**
 * Determine whether or not this list is empty.
 *
 * @return    true if there are no parameters
 */
public boolean isEmpty() {
  return parameters.isEmpty();
}

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

/**
 * Get whether all required elements were found.
 *
 * @return true if all required elements were found.
 */
boolean getRequiredFound()
{
   if (m_requiredFound == null)
     return true;
 return m_requiredFound.isEmpty();
}

代码示例来源:origin: scouter-project/scouter

public boolean isEmpty() {
  return table.isEmpty();
}

代码示例来源:origin: scouter-project/scouter

public boolean isEmpty() {
  return table.isEmpty();
}

代码示例来源:origin: scouter-project/scouter

public boolean isEmpty() {
  return table.isEmpty();
}

代码示例来源:origin: scouter-project/scouter

public boolean isEmpty() {
  return table.isEmpty();
}

代码示例来源:origin: scouter-project/scouter

public boolean isEmpty() {
  return table.isEmpty();
}

代码示例来源:origin: eclipsesource/J2V8

@Override
public boolean isEmpty() {
  return map.isEmpty() && nulls.isEmpty();
}

代码示例来源:origin: commons-logging/commons-logging

/**
 *@see Hashtable
 */
public boolean isEmpty() {
  purge();
  return super.isEmpty();
}

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

public synchronized boolean isEmpty() {
  return project.getProperties().isEmpty();
}

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

/**
 *@see Hashtable
 */    
public boolean isEmpty() {
  purge();
  return super.isEmpty();
}

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

private
void remove0(String key) {
 if(!java1 && tlm != null) {
  Hashtable ht = (Hashtable) ((ThreadLocalMap)tlm).get();
  if(ht != null) {
   ht.remove(key);
   // clean up if this was the last key
   if (ht.isEmpty()) {
    clear0();
   }
  } 
 }
}

代码示例来源:origin: org.apache.ant/ant

/**
 * Check if the table is empty.
 * @return true if it is.
 */
public boolean isEmpty() {
  initAll();
  return super.isEmpty();
}

代码示例来源:origin: org.apache.hadoop/hadoop-common

private synchronized boolean waitForWork() {
 if (calls.isEmpty() && !shouldCloseConnection.get()  && running.get())  {
  long timeout = maxIdleTime-
     (Time.now()-lastActivity.get());
  if (timeout>0) {
   try {
    wait(timeout);
   } catch (InterruptedException e) {}
  }
 }
 
 if (!calls.isEmpty() && !shouldCloseConnection.get() && running.get()) {
  return true;
 } else if (shouldCloseConnection.get()) {
  return false;
 } else if (calls.isEmpty()) { // idle connection closed or stopped
  markClosed(null);
  return false;
 } else { // get stopped but there are still pending requests 
  markClosed((IOException)new IOException().initCause(
    new InterruptedException()));
  return false;
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-common

if (!calls.isEmpty()) {
 LOG.warn(
   "A connection is closed for no cause and calls are not empty");

代码示例来源:origin: org.apache.ant/ant

if (!fileCopyMap.isEmpty()) {
  log("Copying " + fileCopyMap.size()
    + " file" + (fileCopyMap.size() == 1 ? "" : "s")

代码示例来源:origin: plutext/docx4j

/**
 * Serialise the given <code>Hashtable</code> to xml.
 *
 * <p>This methods only works if the {@link Hashtable} contains <code>String</code>
 * objects.
 *
 * @param h The hashtable to be serialized to XML
 *
 * @throws IOException Should an I/O error occur.
 */
public void serializeHashtable(Hashtable<?, ?> h) throws IOException {
 this.xml.openElement("map", !h.isEmpty());
 for (Enumeration<?> e = h.keys(); e.hasMoreElements();) {
  Object key = e.nextElement();
  Object value = h.get(key);
  this.xml.openElement("element");
  this.xml.openElement("key");
  serialize(key, "key");
  this.xml.closeElement();
  this.xml.openElement("value");
  serialize(value, "value");
  this.xml.closeElement();
  this.xml.closeElement();
 }
 this.xml.closeElement();
}

代码示例来源:origin: org.apache.ant/ant

if (antTypeTable.isEmpty()) {

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 *@see Hashtable
 */    
public boolean isEmpty() {
  purge();
  return super.isEmpty();
}

相关文章