Appyx / JKVO

Key-Value-Observing in Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Key-Value-Observing in Java

License:MIT License


Languages

Language:Java 100.0%