Skip to content

Commit eafdfa4

Browse files
author
Nicolai Parlog
committed
Property nesting builders now return the most specific types of properties, namely those which extend 'Simple...Property' and implement 'NestedProperty'.
1 parent c53dce6 commit eafdfa4

6 files changed

+14
-11
lines changed

src/org/codefx/libfx/nesting/AbstractNestingNestingBuilder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public <N> ObservableValueNestingBuilder<N> nestObservable(NestingStep<T, Observ
7272
* the type wrapped by the created nesting builder
7373
* @param nestingStep
7474
* the function which performs the nesting step from one observable to the next
75-
* @return an {@link ObservableValueNestingBuilder} which builds a nesting from this builder's settings and the
75+
* @return an {@link ObjectPropertyNestingBuilder} which builds a nesting from this builder's settings and the
7676
* specified nesting steps
7777
*/
7878
public <N> ObjectPropertyNestingBuilder<N> nestProperty(NestingStep<T, Property<N>> nestingStep) {
@@ -86,7 +86,7 @@ public <N> ObjectPropertyNestingBuilder<N> nestProperty(NestingStep<T, Property<
8686
*
8787
* @param nestingStep
8888
* the function which performs the nesting step from one observable to the next
89-
* @return an {@link ObservableValueNestingBuilder} which builds a nesting from this builder's settings and the
89+
* @return an {@link IntegerPropertyNestingBuilder} which builds a nesting from this builder's settings and the
9090
* specified nesting steps
9191
* @throws NullPointerException
9292
* if the specified function is null
@@ -102,7 +102,7 @@ public IntegerPropertyNestingBuilder nestIntegerProperty(NestingStep<T, IntegerP
102102
*
103103
* @param nestingStep
104104
* the function which performs the nesting step from one observable to the next
105-
* @return an {@link ObservableValueNestingBuilder} which builds a nesting from this builder's settings and the
105+
* @return an {@link DoublePropertyNestingBuilder} which builds a nesting from this builder's settings and the
106106
* specified nesting steps
107107
* @throws NullPointerException
108108
* if the specified function is null

src/org/codefx/libfx/nesting/DoublePropertyNestingBuilder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import javafx.beans.property.DoubleProperty;
44

5+
import org.codefx.libfx.nesting.property.NestedDoubleProperty;
56
import org.codefx.libfx.nesting.property.NestedDoublePropertyBuilder;
67
import org.codefx.libfx.nesting.property.NestedObjectPropertyBuilder;
78

@@ -37,9 +38,9 @@ <P> DoublePropertyNestingBuilder(
3738
* Creates a nested property from this builder's settings. This method can be called arbitrarily often and each call
3839
* returns a new instance.
3940
*
40-
* @return a new {@link DoubleProperty} instance with no owning bean and no name
41+
* @return a new {@link NestedDoubleProperty} instance with no owning bean and no name
4142
*/
42-
public DoubleProperty buildProperty() {
43+
public NestedDoubleProperty buildProperty() {
4344
Nesting<DoubleProperty> nesting = buildNesting();
4445
return NestedDoublePropertyBuilder.forNesting(nesting).build();
4546
}

src/org/codefx/libfx/nesting/IntegerPropertyNestingBuilder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import javafx.beans.property.IntegerProperty;
44

5+
import org.codefx.libfx.nesting.property.NestedIntegerProperty;
56
import org.codefx.libfx.nesting.property.NestedIntegerPropertyBuilder;
67
import org.codefx.libfx.nesting.property.NestedObjectPropertyBuilder;
78

@@ -37,9 +38,9 @@ <P> IntegerPropertyNestingBuilder(
3738
* Creates a nested property from this builder's settings. This method can be called arbitrarily often and each call
3839
* returns a new instance.
3940
*
40-
* @return a new {@link IntegerProperty} instance with no owning bean and no name
41+
* @return a new {@link NestedIntegerProperty} instance with no owning bean and no name
4142
*/
42-
public IntegerProperty buildProperty() {
43+
public NestedIntegerProperty buildProperty() {
4344
Nesting<IntegerProperty> nesting = buildNesting();
4445
return NestedIntegerPropertyBuilder.forNesting(nesting).build();
4546
}

src/org/codefx/libfx/nesting/ObjectPropertyNestingBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import javafx.beans.property.Property;
44

5+
import org.codefx.libfx.nesting.property.NestedObjectProperty;
56
import org.codefx.libfx.nesting.property.NestedObjectPropertyBuilder;
67
import org.codefx.libfx.nesting.property.NestedProperty;
78

@@ -75,7 +76,7 @@ public <N> ObjectPropertyNestingBuilder<N> nest(NestingStep<T, Property<N>> nest
7576
*
7677
* @return a new {@link NestedProperty} instance with no owning bean and no name
7778
*/
78-
public NestedProperty<T> buildProperty() {
79+
public NestedObjectProperty<T> buildProperty() {
7980
Nesting<Property<T>> nesting = buildNesting();
8081
return NestedObjectPropertyBuilder.forNesting(nesting).build();
8182
}

src/org/codefx/libfx/nesting/ObservableValueNestingBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ <P> ObservableValueNestingBuilder(
4747
// #region NEST
4848

4949
/**
50-
* Usability method which simply calls {@link #nestObservable(NestingStep) nestProperty}.
50+
* Usability method which simply calls {@link #nestObservable(NestingStep) nestObservable}.
5151
* <p>
5252
* Returns a builder for nestings whose inner observable is an {@link ObservableValue}. The created nestings depend
5353
* on this builder's outer observable and nesting steps and adds the specified step as the next one.

src/org/codefx/libfx/nesting/property/NestedObjectPropertyBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* the type of the value wrapped by the property which will be build
1313
*/
1414
public final class NestedObjectPropertyBuilder<T>
15-
extends AbstractNestedPropertyBuilder<Property<T>, NestedProperty<T>> {
15+
extends AbstractNestedPropertyBuilder<Property<T>, NestedProperty<T>> {
1616

1717
// #region CONSTRUCTION
1818

@@ -44,7 +44,7 @@ public static <T> NestedObjectPropertyBuilder<T> forNesting(Nesting<Property<T>>
4444
// #region METHODS
4545

4646
@Override
47-
public NestedProperty<T> build() {
47+
public NestedObjectProperty<T> build() {
4848
return new NestedObjectProperty<>(getNesting(), getBean(), getName());
4949
}
5050

0 commit comments

Comments
 (0)