Codota Logo
HashNMap
Code IndexAdd Codota to your IDE (free)

How to use
HashNMap
in
org.jfree.util

Best Java code snippets using org.jfree.util.HashNMap (Showing top 19 results out of 315)

  • Common ways to obtain HashNMap
private void myMethod () {
HashNMap h =
  • Codota IconObject object;(HashNMap) object.clone()
  • Smart code suggestions by Codota
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Tests whether this map contains the given key or value.
 *
 * @param value the value.
 * @return true if the key or value is contained in the map
 */
public boolean contains(final Object value) {
  if (containsKey(value)) {
    return true;
  }
  return containsValue(value);
}
origin: jfree/jcommon

/**
 * Retrieves the first value registered for an key or null if there was no
 * such key in the list.
 *
 * @param key the key.
 * @return the value.
 */
public Object getFirst(final Object key) {
  return get(key, 0);
}
origin: jfree/jcommon

final HashNMap classMap = new HashNMap();
for (int i = 0; i < baseClasses.length; i++) {
      classMap.add(base, child);
final Iterator keys = classMap.keys();
while (keys.hasNext()) {
  final Class base = (Class) keys.next();
  final Class[] childs = (Class[]) classMap.toArray(base, new Class[0]);
  if (childs.length < 2) {
    continue;
origin: jfree/jcommon

/**
 * Creates a deep copy of this HashNMap.
 *
 * @return a clone.
 * @throws CloneNotSupportedException this should never happen.
 */
public Object clone() throws CloneNotSupportedException {
  final HashNMap map = (HashNMap) super.clone();
  map.table = new HashMap();
  final Iterator iterator = keys();
  while (iterator.hasNext()) {
    final Object key = iterator.next();
    final List list = (List) map.table.get(key);
    if (list != null) {
      map.table.put(key, ObjectUtilities.clone(list));
    }
  }
  return map;
}
origin: org.jfree/jcommon

/**
 * Adds a new key/value pair into this map. If the key is not yet in the
 * map, it gets added to the map and the call is equal to
 * put(Object,Object).
 *
 * @param key the key.
 * @param val the value.
 * @return true, if  the value has been added, false otherwise
 */
public boolean add(final Object key, final Object val) {
  final List v = (List) this.table.get(key);
  if (v == null) {
    put(key, val);
    return true;
  }
  else {
    return v.add(val);
  }
}
origin: org.jfree/jcommon

/**
 * Inserts a new key/value pair into the map.  If such a pair already
 * exists, it gets replaced with the given values.
 *
 * @param key the key.
 * @param val the value.
 * @return A boolean.
 */
public boolean put(final Object key, final Object val) {
  final List v = (List) this.table.get(key);
  if (v == null) {
    final List newList = createList();
    newList.add(val);
    this.table.put(key, newList);
    return true;
  }
  else {
    v.clear();
    return v.add(val);
  }
}
origin: jfree/jcommon

this.classDescriptionByPackage = new HashNMap();
for (int i = 0; i < model.size(); i++) {
  final ClassDescription cd = model.get(i);
    final String includeFileName = this.plainFileName + "-" + packageName 
      + this.extension;
    this.classDescriptionByPackage.add(includeFileName, cd);
    this.classDescriptionByPackage.add(cd.getSource(), cd);
this.manualMappingByPackage = new HashNMap();
for (int i = 0; i < manualMappings.length; i++) {
  final ManualMappingInfo mapping = manualMappings[i];
  if (mapping.getSource() == null) {
    this.manualMappingByPackage.add("", mapping);
    this.manualMappingByPackage.add(mapping.getSource(), mapping);
this.multiplexMappingByPackage = new HashNMap();
for (int i = 0; i < multiplexMappings.length; i++) {
  final MultiplexMappingInfo mapping = multiplexMappings[i];
  if (mapping.getSource() == null) {
    this.multiplexMappingByPackage.add("", mapping);
    this.multiplexMappingByPackage.add(mapping.getSource(), mapping);
final Object[] keys = this.classDescriptionByPackage.keySet().toArray();
for (int i = 0; i < keys.length; i++) {
origin: jfree/jcommon

final Object[] keys = this.classDescriptionByPackage.keySet().toArray();
Arrays.sort(keys);
for (int i = 0; i < keys.length; i++) {
final Iterator values = this.classDescriptionByPackage.getAll("");
while (values.hasNext()) {
  final ClassDescription cd = (ClassDescription) values.next();
final Iterator manualMappings = this.manualMappingByPackage.getAll("");
while (manualMappings.hasNext()) {
  final ManualMappingInfo mi = (ManualMappingInfo) manualMappings.next();
final Iterator multiplexMappings = this.multiplexMappingByPackage.getAll("");
while (multiplexMappings.hasNext()) {
  final MultiplexMappingInfo mi = (MultiplexMappingInfo) multiplexMappings.next();
origin: jfree/jcommon

final Iterator values = this.classDescriptionByPackage.getAll(includeFileName);
final Iterator manualMappings = this.manualMappingByPackage.getAll(includeFileName);
final Iterator multiplexMappings = this.multiplexMappingByPackage.getAll(includeFileName);
if (!values.hasNext() && !manualMappings.hasNext() && !multiplexMappings.hasNext()) {
  return;
origin: org.jfree/jcommon

/**
 * Creates a deep copy of this HashNMap.
 *
 * @return a clone.
 * @throws CloneNotSupportedException this should never happen.
 */
public Object clone() throws CloneNotSupportedException {
  final HashNMap map = (HashNMap) super.clone();
  map.table = new HashMap();
  final Iterator iterator = keys();
  while (iterator.hasNext()) {
    final Object key = iterator.next();
    final List list = (List) map.table.get(key);
    if (list != null) {
      map.table.put(key, ObjectUtilities.clone(list));
    }
  }
  return map;
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Adds a new key/value pair into this map. If the key is not yet in the
 * map, it gets added to the map and the call is equal to
 * put(Object,Object).
 *
 * @param key the key.
 * @param val the value.
 * @return true, if  the value has been added, false otherwise
 */
public boolean add(final Object key, final Object val) {
  final List v = (List) this.table.get(key);
  if (v == null) {
    put(key, val);
    return true;
  }
  else {
    return v.add(val);
  }
}
origin: jfree/jcommon

/**
 * Inserts a new key/value pair into the map.  If such a pair already
 * exists, it gets replaced with the given values.
 *
 * @param key the key.
 * @param val the value.
 * @return A boolean.
 */
public boolean put(final Object key, final Object val) {
  final List v = (List) this.table.get(key);
  if (v == null) {
    final List newList = createList();
    newList.add(val);
    this.table.put(key, newList);
    return true;
  }
  else {
    v.clear();
    return v.add(val);
  }
}
origin: jfree/jcommon

/**
 * Tests whether this map contains the given key or value.
 *
 * @param value the value.
 * @return true if the key or value is contained in the map
 */
public boolean contains(final Object value) {
  if (containsKey(value)) {
    return true;
  }
  return containsValue(value);
}
origin: org.jfree/jcommon

/**
 * Retrieves the first value registered for an key or null if there was no
 * such key in the list.
 *
 * @param key the key.
 * @return the value.
 */
public Object getFirst(final Object key) {
  return get(key, 0);
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Creates a deep copy of this HashNMap.
 *
 * @return a clone.
 * @throws CloneNotSupportedException this should never happen.
 */
public Object clone() throws CloneNotSupportedException {
  final HashNMap map = (HashNMap) super.clone();
  map.table = new HashMap();
  final Iterator iterator = keys();
  while (iterator.hasNext()) {
    final Object key = iterator.next();
    final List list = (List) map.table.get(key);
    if (list != null) {
      map.table.put(key, ObjectUtilities.clone(list));
    }
  }
  return map;
}
origin: jfree/jcommon

/**
 * Adds a new key/value pair into this map. If the key is not yet in the
 * map, it gets added to the map and the call is equal to
 * put(Object,Object).
 *
 * @param key the key.
 * @param val the value.
 * @return true, if  the value has been added, false otherwise
 */
public boolean add(final Object key, final Object val) {
  final List v = (List) this.table.get(key);
  if (v == null) {
    put(key, val);
    return true;
  }
  else {
    return v.add(val);
  }
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Inserts a new key/value pair into the map.  If such a pair already
 * exists, it gets replaced with the given values.
 *
 * @param key the key.
 * @param val the value.
 * @return A boolean.
 */
public boolean put(final Object key, final Object val) {
  final List v = (List) this.table.get(key);
  if (v == null) {
    final List newList = createList();
    newList.add(val);
    this.table.put(key, newList);
    return true;
  }
  else {
    v.clear();
    return v.add(val);
  }
}
origin: org.jfree/jcommon

/**
 * Tests whether this map contains the given key or value.
 *
 * @param value the value.
 * @return true if the key or value is contained in the map
 */
public boolean contains(final Object value) {
  if (containsKey(value)) {
    return true;
  }
  return containsValue(value);
}
origin: org.jfree/com.springsource.org.jfree

/**
 * Retrieves the first value registered for an key or null if there was no
 * such key in the list.
 *
 * @param key the key.
 * @return the value.
 */
public Object getFirst(final Object key) {
  return get(key, 0);
}
org.jfree.utilHashNMap

Javadoc

The HashNMap can be used to store multiple values by a single key value. The values stored can be retrieved using a direct query or by creating an enumeration over the stored elements.

Most used methods

  • containsKey
    Tests whether this map contains the given key.
  • containsValue
    Tests whether this map contains the given value.
  • createList
    Returns a new empty list.
  • get
    Retrieves the n-th value registered for an key or null if there was no such key in the list. An inde
  • keys
    Returns all registered keys as an enumeration.
  • put
    Inserts a new key/value pair into the map. If such a pair already exists, it gets replaced with the
  • <init>
    Default constructor.
  • add
    Adds a new key/value pair into this map. If the key is not yet in the map, it gets added to the map
  • getAll
    Returns an iterator over all elements registered to the given key.
  • keySet
    Returns all registered keys as set.
  • toArray
    Returns the contents for the given key as object array. If there were no objects registered with tha
  • toArray

Popular in Java

  • Creating JSON documents from java classes using gson
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • runOnUiThread (Activity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • JTextField (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now