Package com.lightcrafts.mediax.jai.util

Examples of com.lightcrafts.mediax.jai.util.CaselessStringKey


     * <p> The returned <code>List</code> does not contain any
     * duplicates.
     */
    public List getCategories() {

  CaselessStringKey key;
  Vector v = new Vector();
  for (Enumeration e = categories.keys(); e.hasMoreElements(); ) {
      key = (CaselessStringKey)e.nextElement();
      v.add(key.toString());
  }
 
  return (List)v;
    }
View Full Code Here


    // Method to get the SequentialMap for a particular category, creating
    // one if necessary   
    private SequentialMap getCategoryMap(String category) {

  CaselessStringKey categoryKey = new CaselessStringKey(category);
  SequentialMap map = (SequentialMap)categories.get(categoryKey);

  if (map == null) {
      map = new SequentialMap();
      categories.put(categoryKey, map);
View Full Code Here

  /**
   * Add a capability to this SequentialMap.
   */
  void put(NegotiableCapability capability) {
     
      CaselessStringKey capNameKey =
    new CaselessStringKey(capability.getCapabilityName());

      int index = keys.indexOf(capNameKey);

      Vector v;
      if (index == -1) {
View Full Code Here

   * Let a List of all NegotiableCapability objects stored for the
   * given capabilityName.
   */
  List getNCList(String capabilityName) {

      CaselessStringKey capNameKey =
    new CaselessStringKey(capabilityName);

      int index = keys.indexOf(capNameKey);
     
      Vector v;
      if (index == -1) {
View Full Code Here

  /**
   * Remove a NegotiableCapability from this SequentialMap.
   */
  void remove(NegotiableCapability capability) {

      CaselessStringKey capNameKey =
    new CaselessStringKey(capability.getCapabilityName());

      int index = keys.indexOf(capNameKey);
     
      if (index == -1) {
    throw new IllegalArgumentException(
         JaiI18N.getString("NegotiableCapabilitySet2"));
      }
     
      Vector v = (Vector)values.elementAt(index);
      if (v.remove(capability) == false) {
    throw new IllegalArgumentException(
        JaiI18N.getString("NegotiableCapabilitySet2"));
      }
     
      // If this was the only element in the capabilityName Vector
      if (v.isEmpty()) {
    keys.remove(capNameKey);
    values.remove(index);
      }

      if (keys.isEmpty())
    categories.remove(new CaselessStringKey(
                capability.getCategory()));
  }
View Full Code Here

   * SequentialMap.
   */
  Vector getCapabilityNames() {

      Vector v = new Vector();
      CaselessStringKey name;
      for (Iterator i = keys.iterator(); i.hasNext(); ) {
    name = (CaselessStringKey)i.next();
    v.add(name.getName());
      }

      return v;
  }
View Full Code Here

  // Initialize the odHash hashtable
  getServerSupportedOperationList();

  // Get the OperationDescriptor associated with this name.
  OperationDescriptor odesc =
      (OperationDescriptor)odHash.get(new CaselessStringKey(opName));

  if (odesc == null) {
      throw new IllegalArgumentException(
              JaiI18N.getString("RemoteJAI11"));
  }
View Full Code Here

  // Initialize the odHash hashtable
  getServerSupportedOperationList();

  // Get the OperationDescriptor associated with this name.
  OperationDescriptor odesc =
      (OperationDescriptor)odHash.get(new CaselessStringKey(opName));

  if (odesc == null) {
      throw new IllegalArgumentException(
              JaiI18N.getString("RemoteJAI11"));
  }
View Full Code Here

      // Store the descriptors into a Hashtable hashed by
      // their operation name.
      odHash = new Hashtable();
      for (int i=0; i<descriptors.length; i++) {
    odHash.put(new CaselessStringKey(descriptors[i].getName()),
         descriptors[i]);
      }
  }

  return descriptors;
View Full Code Here

    }

    // A case insensitive containsAll for Hashtables containing Strings
    private boolean containsAll(Hashtable thisHash, Hashtable otherHash) {

  CaselessStringKey thisNameKey;
  for (Enumeration i=thisHash.keys(); i.hasMoreElements(); ) {
      thisNameKey = (CaselessStringKey)i.nextElement();
      if (otherHash.containsKey(thisNameKey) == false)
    return false;
  }
View Full Code Here

TOP

Related Classes of com.lightcrafts.mediax.jai.util.CaselessStringKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.