Examples of IteratorEnumeration


Examples of org.apache.commons.collections.iterators.IteratorEnumeration

  public Object getAttribute(String s) {
    return attributes.get(s);
  }

  public Enumeration getAttributeNames() {
    return (new IteratorEnumeration(attributes.keySet().iterator()));
  }
View Full Code Here

Examples of org.apache.commons.collections.iterators.IteratorEnumeration

    /* (non-Javadoc)
     * @see javax.portlet.PortalContext#getSupportedPortletModes()
     */
    public Enumeration<PortletMode> getSupportedPortletModes() {
        return new IteratorEnumeration(this.portletModes.iterator());
    }
View Full Code Here

Examples of org.apache.commons.collections.iterators.IteratorEnumeration

    /* (non-Javadoc)
     * @see javax.portlet.PortalContext#getSupportedWindowStates()
     */
    public Enumeration<WindowState> getSupportedWindowStates() {
        return new IteratorEnumeration(this.windowStates.iterator());
    }
View Full Code Here

Examples of org.apache.commons.collections.iterators.IteratorEnumeration

            return attributeNamesEnum;
        }
       
        final List<String> attributeNames = EnumerationUtils.toList(attributeNamesEnum);
        attributeNames.add(IPortletAdaptor.MULTIVALUED_USERINFO_MAP_ATTRIBUTE);
        return new IteratorEnumeration(attributeNames.iterator());
    }
View Full Code Here

Examples of org.apache.commons.collections.iterators.IteratorEnumeration

    public Enumeration getKeys()
    {
        synchronized(lock)
        {
            return new IteratorEnumeration(session.getPropertyNames());
        }
    }
View Full Code Here

Examples of org.apache.commons.collections.iterators.IteratorEnumeration

    public void testMapMessageWithNullValue() throws Exception
    {
        String[] keys = new String[]{"key", "null"};
        Iterator<String> keyIterator = IteratorUtils.arrayIterator(keys);
        Enumeration<String> keyEnumeration = new IteratorEnumeration(keyIterator);

        MapMessage mockMessage1 = mock(MapMessage.class);
        when(mockMessage1.getMapNames()).thenReturn(keyEnumeration);
        when(mockMessage1.getObject("key")).thenReturn("value");
        when(mockMessage1.getObject("null")).thenReturn(null);
View Full Code Here

Examples of org.apache.commons.collections.iterators.IteratorEnumeration

        return message.getInboundProperty(name);
    }

    public Enumeration getHeaders(String name)
    {
        return new IteratorEnumeration(Arrays.asList(getHeader(name)).iterator());
    }
View Full Code Here

Examples of org.apache.commons.collections.iterators.IteratorEnumeration

    }

    public Enumeration getHeaderNames()
    {
        Iterator<String> iterator = message.getInboundPropertyNames().iterator();
        return new IteratorEnumeration(iterator);
    }
View Full Code Here

Examples of org.apache.commons.collections.iterators.IteratorEnumeration

        Enumeration<?> nameEnum = null;

        if (parameters != null)
        {
            Set<String> keys = parameters.keySet();
            nameEnum = new IteratorEnumeration(keys.iterator());

            for (Map.Entry<String, String[]> entry : parameters.entrySet())
            {
                String key = entry.getKey();
                String[] value = entry.getValue();
View Full Code Here

Examples of org.apache.commons.collections.iterators.IteratorEnumeration

    }

    private Enumeration<?> keyEnumeration(Map<?, ?> map)
    {
        Set<?> keys = map.keySet();
        return new IteratorEnumeration(keys.iterator());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.