Interface IDIndexedAccessible

  • All Known Implementing Classes:
    DriverTask

    public interface IDIndexedAccessible
    A simple interface for id getter and setter.

    Anyone who implements this should implement the code of Object.hashCode() and Object.equals(Object) as follows:

       public class T implements IDIndexedAccessible {
         private ID id;
         ...
         public int hashCode() {
           return id.hashCode();
         }
    
         public boolean equals(Object o) {
           return o instanceof T && ((T)o).id.equals(this.id);
         }
       }
     
    If not, there will be unexpected behaviors using IndexedBlockingQueue.
    • Method Detail

      • getId

        ID getId()
      • setId

        void setId​(ID id)