A simple class to detect changing data. For example, checking if a player's location has changed every second, without needing to run code every tick or mapping data.
// setup a async datawatcher that runs every second
DataWatcher<Location> locationWatceher = new DataWatcher<>(this, false, 20);
// the code that the datawatcher can request a new value from
locationWatceher.setFeeder(() -> player.getLocation());
// setup a callback function for when the location has changed
locationWatceher.setTask((location) -> player.sendMessage("Your location has updated! to " + location));