Skip to content

Instantly share code, notes, and snippets.

@codenameone
Last active July 21, 2017 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codenameone/9e124bf7975b263a0319ec42d2718d64 to your computer and use it in GitHub Desktop.
Save codenameone/9e124bf7975b263a0319ec42d2718d64 to your computer and use it in GitHub Desktop.
public final DoubleProperty<Length> metre = new DoubleProperty<>("metre");
public final DoubleProperty<Length> km = new DoubleProperty<>("km") {
public Double get() {
return meter.get() / 0.001;
}
public Length set(Double d) {
return meter.set(d * 1000);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment