Package org.apache.commons.collections.iterators

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


     */
    public static Enumeration asEnumeration(Iterator iterator) {
        if (iterator == null) {
            throw new NullPointerException("Iterator must not be null");
        }
        return new IteratorEnumeration(iterator);
    }
View Full Code Here


    }
    return buffer.toString();
  }

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

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

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

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

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

            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

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

    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

        return message.getInboundProperty(name);
    }

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

    }

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

TOP

Related Classes of org.apache.commons.collections.iterators.IteratorEnumeration

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.