Package com.uwyn.jhighlight.pcj

Examples of com.uwyn.jhighlight.pcj.CharIterator


    public boolean add(char v)
    { Exceptions.unsupported("add"); return false; }
 
    public boolean addAll(CharCollection c)
  {
        CharIterator i = c.iterator()//  Throws NullPointerException
        boolean result = false;
        while (i.hasNext())
            result = result|add(i.next());
        return result;
    }
View Full Code Here


        return result;
    }
 
    public void clear()
  {
        CharIterator i = iterator();
        while (i.hasNext())
    {
            i.next();
            i.remove();
        }
    }
View Full Code Here

        }
    }
 
    public boolean contains(char v)
  {
        CharIterator i = iterator();
        while (i.hasNext())
            if (i.next()==v)
                return true;
        return false;
    }
View Full Code Here

        return false;
    }
 
    public boolean containsAll(CharCollection c)
  {
        CharIterator i = c.iterator()//  Throws NullPointerException
        while (i.hasNext())
            if (!contains(i.next()))
                return false;
        return true;
    }
View Full Code Here

    public boolean isEmpty()
    { return size()==0; }
 
    public boolean remove(char v)
  {
        CharIterator i = iterator();
        boolean result = false;
        while (i.hasNext())
    {
            if (i.next()==v)
      {
                i.remove();
                result = true;
                break;
            }
        }
        return result;
View Full Code Here

 
    public boolean removeAll(CharCollection c)
  {
        if (c==null)
            Exceptions.nullArgument("collection");
        CharIterator i = iterator();
        boolean result = false;
        while (i.hasNext())
    {
            if (c.contains(i.next()))
      {
                i.remove();
                result = true;
            }
        }
        return result;
    }
View Full Code Here

 
    public boolean retainAll(CharCollection c)
  {
        if (c==null)
            Exceptions.nullArgument("collection");
        CharIterator i = iterator();
        boolean result = false;
        while (i.hasNext())
    {
            if (!c.contains(i.next()))
      {
                i.remove();
                result = true;
            }
        }
        return result;
    }
View Full Code Here

        return result;
    }
 
    public int size()
  {
        CharIterator i = iterator();
        int size = 0;
        while (i.hasNext())
    {
            i.next();
            size++;
        }
        return size;
    }
View Full Code Here

    public char[] toArray(char[] a)
  {
        int size = size();
        if (a==null||a.length<size)
            a = new char[size];
        CharIterator i = iterator();
        int index = 0;
        while (i.hasNext())
    {
            a[index] = i.next();
            index++;
        }
        return a;
    }
View Full Code Here

     */
    public String toString()
  {
        StringBuffer s = new StringBuffer();
        s.append('[');
        CharIterator i = iterator();
        while (i.hasNext())
    {
            if (s.length()>1)
                s.append(',');
            s.append(Display.display(i.next()));
        }
        s.append(']');
        return s.toString();
    }
View Full Code Here

TOP

Related Classes of com.uwyn.jhighlight.pcj.CharIterator

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.