Class CopyOnWriteSet<T>

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

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

      Fields 
      Modifier and Type Field Description
      private boolean is_identify  
      private java.util.Set<T> set  
      private boolean visible  
    • Constructor Summary

      Constructors 
      Constructor Description
      CopyOnWriteSet​(boolean identity_hash_set)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(T o)  
      boolean addAll​(java.util.Collection<T> to_add)  
      void clear()  
      boolean contains​(T o)  
      java.util.Set<T> getSet()  
      boolean isEmpty()  
      java.util.Iterator<T> iterator()  
      boolean remove​(T o)  
      int size()  
      • Methods inherited from class java.lang.Object

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

        forEach, spliterator
    • Field Detail

      • is_identify

        private final boolean is_identify
      • set

        private volatile java.util.Set<T> set
      • visible

        private boolean visible
    • Constructor Detail

      • CopyOnWriteSet

        public CopyOnWriteSet​(boolean identity_hash_set)
    • Method Detail

      • add

        public boolean add​(T o)
      • addAll

        public boolean addAll​(java.util.Collection<T> to_add)
      • remove

        public boolean remove​(T o)
      • contains

        public boolean contains​(T o)
      • clear

        public void clear()
      • isEmpty

        public boolean isEmpty()
      • size

        public int size()
      • getSet

        public java.util.Set<T> getSet()
      • iterator

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