Package java.util

Examples of java.util.AbstractList$SubList


        assertNotNull(collection);
        assertTrue(collection instanceof Serializable);
    }
   
    public void testWrapNonSerializable() {
        LongCollection collection = CollectionLongCollection.wrap(new AbstractList() {
            public Object get(int i) { throw new IndexOutOfBoundsException(); }
            public int size() { return 0; }
        });
        assertNotNull(collection);
        assertTrue(!(collection instanceof Serializable));
View Full Code Here


         */
        public List getAliases(final boolean ident, final boolean inner) {
            if (_ids == null)
                return Collections.EMPTY_LIST;

            return new AbstractList() {
                public int size() {
                    return (ident && _idents != null) ? _idents.size()
                        : _ids.size();
                }

View Full Code Here

        return _locale;
    }

    public List getAvailableLanguages()
    {
        return new AbstractList()
        {
            public Object get(int index)
            {
                Locale locale = (Locale)AVAILABLE_LOCALES.get(index);
                String language = locale.getDisplayLanguage(locale);
View Full Code Here

      return particle.getMaxOccursUnbounded() || particle.getMaxOccurs() > 1 || particle.getMinOccurs() > 1;
   }

   private static final List asList(final Object arr)
   {
      return new AbstractList()
      {
         private final Object array = arr;

         public Object get(int index)
         {
View Full Code Here

      //from possible issues caused by iteration tricks. e.g.: returning custom iterator
      //caching current element and comparing indices inside get()
      //
      //possible concurrent collection modifications and multithreading will break the magic
    } else if (data instanceof NodeList) {
      this.list = new AbstractList() {

        public Object get(int index) {
          return ((NodeList) getWrappedData()).item(index);
        }
View Full Code Here

  public void setWrappedData(Object data) {
    this.wrappedData = data;
    if (data instanceof List) {
      this.list = (List) data;
    } else if (data instanceof NodeList) {
      this.list = new AbstractList() {

        public Object get(int index) {
          return ((NodeList) getWrappedData()).item(index);
        }
View Full Code Here

         */
        public List getAliases(final boolean ident, final boolean inner) {
            if (_ids == null)
                return Collections.EMPTY_LIST;

            return new AbstractList() {
                public int size() {
                    return (ident && _idents != null) ? _idents.size()
                        : _ids.size();
                }

View Full Code Here

         */
        public List getAliases(final boolean ident, final boolean inner) {
            if (_ids == null)
                return Collections.EMPTY_LIST;

            return new AbstractList() {
                public int size() {
                    return (ident && _idents != null) ? _idents.size()
                        : _ids.size();
                }

View Full Code Here

      return particle.getMaxOccursUnbounded() || particle.getMaxOccurs() > 1 || particle.getMinOccurs() > 1;
   }

   private static final List asList(final Object arr)
   {
      return new AbstractList()
      {
         private final Object array = arr;

         public Object get(int index)
         {
View Full Code Here

         */
        public List getAliases(final boolean ident, final boolean inner) {
            if (_ids == null)
                return Collections.EMPTY_LIST;

            return new AbstractList() {
                public int size() {
                    return (ident && _idents != null) ? _idents.size()
                        : _ids.size();
                }

View Full Code Here

TOP

Related Classes of java.util.AbstractList$SubList

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.