Package gw.util

Class IdentitySet<T>

  • All Implemented Interfaces:
    java.lang.Iterable<T>

    public class IdentitySet<T>
    extends java.lang.Object
    implements java.lang.Iterable<T>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int _index  
      private T[] _set  
    • Constructor Summary

      Constructors 
      Constructor Description
      IdentitySet​(int size)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(T o)  
      void addAll​(java.util.Collection<? extends T> c)  
      void clear()  
      boolean contains​(T o)  
      boolean isEmpty()  
      java.util.Iterator<T> iterator()  
      void remove​(T o)  
      int size()  
      T[] toArray​(T[] array)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • _index

        private int _index
      • _set

        private T[] _set
    • Constructor Detail

      • IdentitySet

        public IdentitySet​(int size)
    • Method Detail

      • isEmpty

        public boolean isEmpty()
      • size

        public int size()
      • contains

        public boolean contains​(T o)
      • add

        public void add​(T o)
      • remove

        public void remove​(T o)
      • addAll

        public void addAll​(java.util.Collection<? extends T> c)
      • clear

        public void clear()
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<T>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toArray

        public T[] toArray​(T[] array)