Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Latest commit

 

History

History
19 lines (13 loc) · 577 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 577 Bytes

JKVO

Key-Value-Observing in Java

This project is an implementation of the KVO provided by ObjectiveC in Java.

How to use?

  • Make your model class extend JKVObservable
  • Replace your setter methods with:
    setValue(Object newValue){
    this.value=setKVOValue("identifier", this.value, newValue);
    }
  • Make your target class implement JKVObserver
  • Call addObserver and removeObserver at any place
  • Make sure to always use the setters and the corresponding identifiers ;)

Setup

  • Just copy/paste the java files

  • Import the Jar file