java.lang.Object
org.codehaus.modello.plugin.java.javasource.JNamedMap

@Deprecated public class JNamedMap extends Object
Deprecated.
use LinkedHashMap instead

A simple String to Object mapping which preserves order.

Note: This class is not synchronized. So be careful. :-)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private List<String>
    Deprecated.
     
    private List<Object>
    Deprecated.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
    Creates a new JNamedMap
    JNamedMap(int size)
    Deprecated.
    Creates a new JNamedMap with the given size.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(int index)
    Deprecated.
    Returns the Object at the given index.
    get(String name)
    Deprecated.
    Returns the Object associated with the given name.
    Deprecated.
    Returns the name associated with the given Object
    Deprecated.
    Return a Vector of names
    Deprecated.
    Return a Vector of Objects
    int
    Deprecated.
    Returns the index of the Object which has been mapped (associated) with the given name
    void
    put(String name, Object obj)
    Deprecated.
    Maps (associates) an Object with a name
    remove(int index)
    Deprecated.
    Removes and returns the Object located at the given index
    remove(String name)
    Deprecated.
    Removes and returns the Object associated with the given name
    int
    Deprecated.
    Returns the number of Object associations currently in this named map

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • JNamedMap

      public JNamedMap()
      Deprecated.
      Creates a new JNamedMap
    • JNamedMap

      public JNamedMap(int size)
      Deprecated.
      Creates a new JNamedMap with the given size.
      Parameters:
      size - the initial size for this NamedMap
  • Method Details

    • get

      public Object get(String name)
      Deprecated.
      Returns the Object associated with the given name.
      Parameters:
      name - the name to search for
      Returns:
      the Object associated with the given name
    • get

      public Object get(int index) throws IndexOutOfBoundsException
      Deprecated.
      Returns the Object at the given index.
      Parameters:
      index - the index of the Object to return
      Returns:
      the Object at the given index
      Throws:
      IndexOutOfBoundsException
    • getNameByObject

      public String getNameByObject(Object obj)
      Deprecated.
      Returns the name associated with the given Object
      Parameters:
      obj - the Object to search for
      Returns:
      the name of the given Object
    • getNames

      public Vector<String> getNames()
      Deprecated.
      Return a Vector of names
      Returns:
      a Vector of names
    • getObjects

      public Vector<Object> getObjects()
      Deprecated.
      Return a Vector of Objects
      Returns:
      a Vector of Objects
    • indexOf

      public int indexOf(String name)
      Deprecated.
      Returns the index of the Object which has been mapped (associated) with the given name
      Parameters:
      name - the name
      Returns:
      the index of the Object which has been mapped (associated) to the given name
    • put

      public void put(String name, Object obj)
      Deprecated.
      Maps (associates) an Object with a name
      Parameters:
      name - the name to associate with the given Object
      obj - the Object to be mapped
    • remove

      public Object remove(int index) throws IndexOutOfBoundsException
      Deprecated.
      Removes and returns the Object located at the given index
      Parameters:
      index - the index of the Object to remove
      Returns:
      the object removed from the map.
      Throws:
      IndexOutOfBoundsException
    • remove

      public Object remove(String name)
      Deprecated.
      Removes and returns the Object associated with the given name
      Parameters:
      name - the name of the Object to remove
      Returns:
      the object removed from the map.
    • size

      public int size()
      Deprecated.
      Returns the number of Object associations currently in this named map
      Returns:
      the number of Object associations currently in this named map