1 11 package org.eclipse.core.internal.registry; 12 13 22 public final class RegistryTimestamp { 23 26 private long aggregateTimestamp; 27 28 private boolean modified; 29 30 33 public RegistryTimestamp() { 34 reset(); 35 } 36 37 41 public long getContentsTimestamp() { 42 return aggregateTimestamp; 43 } 44 45 49 public void set(long timestamp) { 50 aggregateTimestamp = timestamp; 51 modified = false; 52 } 53 54 57 public void reset() { 58 aggregateTimestamp = 0; 59 modified = false; 60 } 61 62 67 public boolean isModifed() { 68 return modified; 69 } 70 71 75 public void add(long timestamp) { 76 aggregateTimestamp ^= timestamp; 77 modified = true; 78 } 79 80 84 public void remove(long timestamp) { 85 aggregateTimestamp ^= timestamp; 86 modified = true; 87 } 88 } 89 | Popular Tags |