// Path: api/src/main/java/javax/observer/Observable.java
// public interface Observable<V> {
// 
//     /**
//      * Returns the current value.
//      * @return the value
//      */
//     V getValue();
// 
//     /**
//      * Returns an {@link Optional} that contains the current value or {@code null}. This is a
//      * convenience method that can be used to acces the value by using a fluent API based on
//      * the {@link Optional} API.
//      * @return an {@link Optional} that contains the current value or {@code null}
//      */
//     default Optional<V> value() {
//         return Optional.ofNullable(getValue());
//     }
// 
//     Subscription onChanged(ValueChangedListener<? super V> listener);
// 
//     default Subscription onChangedAndCall(final ValueChangedListener<? super V> listener) {
//         final Subscription subscription = onChanged(listener);
//         listener.valueChanged(new ValueChangedEvent<V>() {
//             @Override
//             public Observable<V> getObservable() {
//                 return Observable.this;
//             }
// 
//             @Override
//             public V getValue() {
//                 return Observable.this.getValue();
//             }
//         });
//         return subscription;
//     }
// 
//     Subscription onWillChange(ValueWillChangeListener<? super V> listener);
// }
// 
// Path: api/src/main/java/javax/observer/Property.java
// public interface Property<V> extends Observable<V> {
// 
//     /**
//      * Replaces the internal value with the given new value. This should end in calling the
//      * {@link ValueChangeListener#valueChanged(ValueChangeEvent)} method on all registered
//      * listeners.
//      * @param value the new value
//      */
//     void setValue(V value);
// }
// 
// Path: api/src/main/java/javax/observer/Subscription.java
// @FunctionalInterface
// public interface Subscription {
// 
//     void unsubscribe();
// }
// 
// Path: api/src/main/java/javax/observer/binding/ConvertableBidirectionalBindable.java
// public interface ConvertableBidirectionalBindable<T> extends ConvertableBindable<T>, BidirectionalBindable<T> {
// 
//     /**
//       *By defining a converter a bidirectional binding to an {@link Property} with a different value
//      * type can be defined. For more information about binding see {@link BidirectionalBindable#bidirectionalTo(Property)}
//      * @param property
//      * @param converter the converter that will be used to convert any new value of the {@link Property}
//      *                  to the correct value type
//      * @param converter2 the converter that will be used to convert any new value to the value type of the {@link Property}
//      * @param <U> value type of the {@link Property} to that this instance will be bound.
//      * @return a {@link Subscription} to unbind the binding that is created by calling this method
//      */
//     <U> Subscription bidirectionalTo(Property<U> property, Function<U, T> converter, Function<T, U> converter2);
// 
//     @Override
//     default Subscription bidirectionalTo(Property<T> property) {
//         return bidirectionalTo(property, v -> v, v -> v);
//     }
// }
// 
// Path: api/src/main/java/javax/observer/binding/ConvertableBindable.java
// public interface ConvertableBindable<T> extends Bindable<T> {
// 
//     /**
//      * By defining a converter a unidirectional binding to an {@link Observable} with a different value
//      * type can be defined. For more information about binding see {@link Bindable#to(Observable)}
//      * @param observable the {@link Observable} to that this instance will be bound.
//      * @param converter the converter that will be used to convert any new value of the {@link Observable}
//      *                  to the correct value type
//      * @param <U> value type of the {@link Observable} to that this instance will be bound.
//      * @return a {@link Subscription} to unbind the binding that is created by calling this method
//      */
//     <U> Subscription to(Observable<U> observable, Function<U, T> converter);
// 
//     @Override
//     default Subscription to(Observable<T> observable) {
//         return to(observable, v -> v);
//     }
// 
// }


import javax.observer.Observable;
import javax.observer.Property;
import javax.observer.Subscription;
import javax.observer.binding.ConvertableBidirectionalBindable;
import javax.observer.binding.ConvertableBindable;
import java.util.function.Consumer;
import java.util.function.Function;
package com.guigarage.binding;


/**
 * Class that provides basic functionallity for bindings wothout handling any thread issues, etc. This is not thread safe
 * and should only be used for Bindings that will be handled on the same Thread.
 */
public class Binding {

    public static <T> ConvertableBidirectionalBindable<T> bind(Property<T> property) {
// Path: api/src/main/java/javax/observer/Observable.java
// public interface Observable<V> {
// 
//     /**
//      * Returns the current value.
//      * @return the value
//      */
//     V getValue();
// 
//     /**
//      * Returns an {@link Optional} that contains the current value or {@code null}. This is a
//      * convenience method that can be used to acces the value by using a fluent API based on
//      * the {@link Optional} API.
//      * @return an {@link Optional} that contains the current value or {@code null}
//      */
//     default Optional<V> value() {
//         return Optional.ofNullable(getValue());
//     }
// 
//     Subscription onChanged(ValueChangedListener<? super V> listener);
// 
//     default Subscription onChangedAndCall(final ValueChangedListener<? super V> listener) {
//         final Subscription subscription = onChanged(listener);
//         listener.valueChanged(new ValueChangedEvent<V>() {
//             @Override
//             public Observable<V> getObservable() {
//                 return Observable.this;
//             }
// 
//             @Override
//             public V getValue() {
//                 return Observable.this.getValue();
//             }
//         });
//         return subscription;
//     }
// 
//     Subscription onWillChange(ValueWillChangeListener<? super V> listener);
// }
// 
// Path: api/src/main/java/javax/observer/Property.java
// public interface Property<V> extends Observable<V> {
// 
//     /**
//      * Replaces the internal value with the given new value. This should end in calling the
//      * {@link ValueChangeListener#valueChanged(ValueChangeEvent)} method on all registered
//      * listeners.
//      * @param value the new value
//      */
//     void setValue(V value);
// }
// 
// Path: api/src/main/java/javax/observer/Subscription.java
// @FunctionalInterface
// public interface Subscription {
// 
//     void unsubscribe();
// }
// 
// Path: api/src/main/java/javax/observer/binding/ConvertableBidirectionalBindable.java
// public interface ConvertableBidirectionalBindable<T> extends ConvertableBindable<T>, BidirectionalBindable<T> {
// 
//     /**
//       *By defining a converter a bidirectional binding to an {@link Property} with a different value
//      * type can be defined. For more information about binding see {@link BidirectionalBindable#bidirectionalTo(Property)}
//      * @param property
//      * @param converter the converter that will be used to convert any new value of the {@link Property}
//      *                  to the correct value type
//      * @param converter2 the converter that will be used to convert any new value to the value type of the {@link Property}
//      * @param <U> value type of the {@link Property} to that this instance will be bound.
//      * @return a {@link Subscription} to unbind the binding that is created by calling this method
//      */
//     <U> Subscription bidirectionalTo(Property<U> property, Function<U, T> converter, Function<T, U> converter2);
// 
//     @Override
//     default Subscription bidirectionalTo(Property<T> property) {
//         return bidirectionalTo(property, v -> v, v -> v);
//     }
// }
// 
// Path: api/src/main/java/javax/observer/binding/ConvertableBindable.java
// public interface ConvertableBindable<T> extends Bindable<T> {
// 
//     /**
//      * By defining a converter a unidirectional binding to an {@link Observable} with a different value
//      * type can be defined. For more information about binding see {@link Bindable#to(Observable)}
//      * @param observable the {@link Observable} to that this instance will be bound.
//      * @param converter the converter that will be used to convert any new value of the {@link Observable}
//      *                  to the correct value type
//      * @param <U> value type of the {@link Observable} to that this instance will be bound.
//      * @return a {@link Subscription} to unbind the binding that is created by calling this method
//      */
//     <U> Subscription to(Observable<U> observable, Function<U, T> converter);
// 
//     @Override
//     default Subscription to(Observable<T> observable) {
//         return to(observable, v -> v);
//     }
// 
// }


// Path: impl/src/main/java/com/guigarage/binding/Binding.java
import javax.observer.Observable;
import javax.observer.Property;
import javax.observer.Subscription;
import javax.observer.binding.ConvertableBidirectionalBindable;
import javax.observer.binding.ConvertableBindable;
import java.util.function.Consumer;
import java.util.function.Function;

package com.guigarage.binding;


/**
 * Class that provides basic functionallity for bindings wothout handling any thread issues, etc. This is not thread safe
 * and should only be used for Bindings that will be handled on the same Thread.
 */
public class Binding {

    public static <T> ConvertableBidirectionalBindable<T> bind(Property<T> property) {
        return new ConvertableBidirectionalBindable<T>() {