Skip to content

Commit 8435c75

Browse files
author
Nicolai Parlog
committed
Refactored 'Nested.isInnerObservableNull' to 'Nested.isInnerObservablePresent'.
1 parent 0f28819 commit 8435c75

11 files changed

+92
-86
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
public interface Nested {
99

1010
/**
11-
* Indicates whether the inner observable is currently null.
11+
* Indicates whether the inner observable is currently present.
1212
*
13-
* @return whether the inner observable is null as a property
13+
* @return whether the inner observable is present, i.e. not null (as a property)
1414
*/
15-
ReadOnlyBooleanProperty innerObservableNull();
15+
ReadOnlyBooleanProperty innerObservablePresent();
1616

1717
/**
18-
* Indicates whether the inner observable is currently null.
18+
* Indicates whether the inner observable is currently present.
1919
*
20-
* @return true if the inner observable is null
20+
* @return true if the inner observable is present, i.e. not null
2121
*/
22-
boolean isInnerObservableNull();
22+
boolean isInnerObservablePresent();
2323

2424
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
public interface Nesting<O extends Observable> {
2020

2121
/**
22-
* The current innermost observable in the hierarchy. If some observable or its value were null, this contains null
23-
* as well.
22+
* A property holding the current innermost observable in the hierarchy. If some observable or its value were null,
23+
* this contains {@link Optional#empty()}.
2424
*
25-
* @return the innermost {@link ObservableValue}
25+
* @return the innermost {@link ObservableValue} in an {@link Optional}
2626
*/
2727
ReadOnlyProperty<Optional<O>> innerObservable();
2828

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ public class NestedBooleanProperty extends SimpleBooleanProperty implements Nest
1717
// #region PROPERTIES
1818

1919
/**
20-
* The property indicating whether the nesting's inner observable is currently null.
20+
* The property indicating whether the nesting's inner observable is currently present, i.e. not null.
2121
*/
22-
private final BooleanProperty innerObservableNull;
22+
private final BooleanProperty innerObservablePresent;
2323

2424
//#end PROPERTIES
2525

@@ -38,23 +38,23 @@ public class NestedBooleanProperty extends SimpleBooleanProperty implements Nest
3838
NestedBooleanProperty(Nesting<? extends Property<Boolean>> nesting, Object bean, String name) {
3939
super(bean, name);
4040
Objects.requireNonNull(nesting, "The argument 'nesting' must not be null.");
41-
this.innerObservableNull = new SimpleBooleanProperty(this, "innerObservableNull");
41+
this.innerObservablePresent = new SimpleBooleanProperty(this, "innerObservablePresent");
4242

43-
PropertyToNestingBinding.bind(this, isNull -> innerObservableNull.set(isNull), nesting);
43+
PropertyToNestingBinding.bind(this, isPresent -> innerObservablePresent.set(isPresent), nesting);
4444
}
4545

4646
//#end CONSTUCTION
4747

4848
// #region IMPLEMENTATION OF 'NestedProperty'
4949

5050
@Override
51-
public ReadOnlyBooleanProperty innerObservableNull() {
52-
return innerObservableNull;
51+
public ReadOnlyBooleanProperty innerObservablePresent() {
52+
return innerObservablePresent;
5353
}
5454

5555
@Override
56-
public boolean isInnerObservableNull() {
57-
return innerObservableNull.get();
56+
public boolean isInnerObservablePresent() {
57+
return innerObservablePresent.get();
5858
}
5959

6060
//#end IMPLEMENTATION OF 'NestedProperty'

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public class NestedDoubleProperty extends SimpleDoubleProperty implements Nested
1919
// #region PROPERTIES
2020

2121
/**
22-
* The property indicating whether the nesting's inner observable is currently null.
22+
* The property indicating whether the nesting's inner observable is currently present, i.e. not null.
2323
*/
24-
private final BooleanProperty innerObservableNull;
24+
private final BooleanProperty innerObservablePresent;
2525

2626
//#end PROPERTIES
2727

@@ -40,23 +40,23 @@ public class NestedDoubleProperty extends SimpleDoubleProperty implements Nested
4040
NestedDoubleProperty(Nesting<? extends Property<Number>> nesting, Object bean, String name) {
4141
super(bean, name);
4242
Objects.requireNonNull(nesting, "The argument 'nesting' must not be null.");
43-
this.innerObservableNull = new SimpleBooleanProperty(this, "innerObservableNull");
43+
this.innerObservablePresent = new SimpleBooleanProperty(this, "innerObservablePresent");
4444

45-
PropertyToNestingBinding.bind(this, isNull -> innerObservableNull.set(isNull), nesting);
45+
PropertyToNestingBinding.bind(this, isPresent -> innerObservablePresent.set(isPresent), nesting);
4646
}
4747

4848
//#end CONSTUCTION
4949

5050
// #region IMPLEMENTATION OF 'NestedProperty'
5151

5252
@Override
53-
public ReadOnlyBooleanProperty innerObservableNull() {
54-
return innerObservableNull;
53+
public ReadOnlyBooleanProperty innerObservablePresent() {
54+
return innerObservablePresent;
5555
}
5656

5757
@Override
58-
public boolean isInnerObservableNull() {
59-
return innerObservableNull.get();
58+
public boolean isInnerObservablePresent() {
59+
return innerObservablePresent.get();
6060
}
6161

6262
//#end IMPLEMENTATION OF 'NestedProperty'

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public class NestedFloatProperty extends SimpleFloatProperty implements NestedPr
1919
// #region PROPERTIES
2020

2121
/**
22-
* The property indicating whether the nesting's inner observable is currently null.
22+
* The property indicating whether the nesting's inner observable is currently present, i.e. not null.
2323
*/
24-
private final BooleanProperty innerObservableNull;
24+
private final BooleanProperty innerObservablePresent;
2525

2626
//#end PROPERTIES
2727

@@ -40,23 +40,23 @@ public class NestedFloatProperty extends SimpleFloatProperty implements NestedPr
4040
NestedFloatProperty(Nesting<? extends Property<Number>> nesting, Object bean, String name) {
4141
super(bean, name);
4242
Objects.requireNonNull(nesting, "The argument 'nesting' must not be null.");
43-
this.innerObservableNull = new SimpleBooleanProperty(this, "innerObservableNull");
43+
this.innerObservablePresent = new SimpleBooleanProperty(this, "innerObservablePresent");
4444

45-
PropertyToNestingBinding.bind(this, isNull -> innerObservableNull.set(isNull), nesting);
45+
PropertyToNestingBinding.bind(this, isPresent -> innerObservablePresent.set(isPresent), nesting);
4646
}
4747

4848
//#end CONSTUCTION
4949

5050
// #region IMPLEMENTATION OF 'NestedProperty'
5151

5252
@Override
53-
public ReadOnlyBooleanProperty innerObservableNull() {
54-
return innerObservableNull;
53+
public ReadOnlyBooleanProperty innerObservablePresent() {
54+
return innerObservablePresent;
5555
}
5656

5757
@Override
58-
public boolean isInnerObservableNull() {
59-
return innerObservableNull.get();
58+
public boolean isInnerObservablePresent() {
59+
return innerObservablePresent.get();
6060
}
6161

6262
//#end IMPLEMENTATION OF 'NestedProperty'

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public class NestedIntegerProperty extends SimpleIntegerProperty implements Nest
1919
// #region PROPERTIES
2020

2121
/**
22-
* The property indicating whether the nesting's inner observable is currently null.
22+
* The property indicating whether the nesting's inner observable is currently present, i.e. not null.
2323
*/
24-
private final BooleanProperty innerObservableNull;
24+
private final BooleanProperty innerObservablePresent;
2525

2626
//#end PROPERTIES
2727

@@ -40,23 +40,23 @@ public class NestedIntegerProperty extends SimpleIntegerProperty implements Nest
4040
NestedIntegerProperty(Nesting<? extends Property<Number>> nesting, Object bean, String name) {
4141
super(bean, name);
4242
Objects.requireNonNull(nesting, "The argument 'nesting' must not be null.");
43-
this.innerObservableNull = new SimpleBooleanProperty(this, "innerObservableNull");
43+
this.innerObservablePresent = new SimpleBooleanProperty(this, "innerObservablePresent");
4444

45-
PropertyToNestingBinding.bind(this, isNull -> innerObservableNull.set(isNull), nesting);
45+
PropertyToNestingBinding.bind(this, isPresent -> innerObservablePresent.set(isPresent), nesting);
4646
}
4747

4848
//#end CONSTUCTION
4949

5050
// #region IMPLEMENTATION OF 'NestedProperty'
5151

5252
@Override
53-
public ReadOnlyBooleanProperty innerObservableNull() {
54-
return innerObservableNull;
53+
public ReadOnlyBooleanProperty innerObservablePresent() {
54+
return innerObservablePresent;
5555
}
5656

5757
@Override
58-
public boolean isInnerObservableNull() {
59-
return innerObservableNull.get();
58+
public boolean isInnerObservablePresent() {
59+
return innerObservablePresent.get();
6060
}
6161

6262
//#end IMPLEMENTATION OF 'NestedProperty'

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public class NestedLongProperty extends SimpleLongProperty implements NestedProp
1919
// #region PROPERTIES
2020

2121
/**
22-
* The property indicating whether the nesting's inner observable is currently null.
22+
* The property indicating whether the nesting's inner observable is currently present, i.e. not null.
2323
*/
24-
private final BooleanProperty innerObservableNull;
24+
private final BooleanProperty innerObservablePresent;
2525

2626
//#end PROPERTIES
2727

@@ -40,23 +40,23 @@ public class NestedLongProperty extends SimpleLongProperty implements NestedProp
4040
NestedLongProperty(Nesting<? extends Property<Number>> nesting, Object bean, String name) {
4141
super(bean, name);
4242
Objects.requireNonNull(nesting, "The argument 'nesting' must not be null.");
43-
this.innerObservableNull = new SimpleBooleanProperty(this, "innerObservableNull");
43+
this.innerObservablePresent = new SimpleBooleanProperty(this, "innerObservablePresent");
4444

45-
PropertyToNestingBinding.bind(this, isNull -> innerObservableNull.set(isNull), nesting);
45+
PropertyToNestingBinding.bind(this, isPresent -> innerObservablePresent.set(isPresent), nesting);
4646
}
4747

4848
//#end CONSTUCTION
4949

5050
// #region IMPLEMENTATION OF 'NestedProperty'
5151

5252
@Override
53-
public ReadOnlyBooleanProperty innerObservableNull() {
54-
return innerObservableNull;
53+
public ReadOnlyBooleanProperty innerObservablePresent() {
54+
return innerObservablePresent;
5555
}
5656

5757
@Override
58-
public boolean isInnerObservableNull() {
59-
return innerObservableNull.get();
58+
public boolean isInnerObservablePresent() {
59+
return innerObservablePresent.get();
6060
}
6161

6262
//#end IMPLEMENTATION OF 'NestedProperty'

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ public class NestedObjectProperty<T> extends SimpleObjectProperty<T> implements
2222
// #region PROPERTIES
2323

2424
/**
25-
* The property indicating whether the nesting's inner observable is currently null.
25+
* The property indicating whether the nesting's inner observable is currently present, i.e. not null.
2626
*/
27-
private final BooleanProperty innerObservableNull;
27+
private final BooleanProperty innerObservablePresent;
2828

2929
//#end PROPERTIES
3030

@@ -43,23 +43,23 @@ public class NestedObjectProperty<T> extends SimpleObjectProperty<T> implements
4343
NestedObjectProperty(Nesting<? extends Property<T>> nesting, Object bean, String name) {
4444
super(bean, name);
4545
Objects.requireNonNull(nesting, "The argument 'nesting' must not be null.");
46-
this.innerObservableNull = new SimpleBooleanProperty(this, "innerObservableNull");
46+
this.innerObservablePresent = new SimpleBooleanProperty(this, "innerObservablePresent");
4747

48-
PropertyToNestingBinding.bind(this, isNull -> innerObservableNull.set(isNull), nesting);
48+
PropertyToNestingBinding.bind(this, isPresent -> innerObservablePresent.set(isPresent), nesting);
4949
}
5050

5151
//#end CONSTUCTION
5252

5353
// #region IMPLEMENTATION OF 'NestedProperty'
5454

5555
@Override
56-
public ReadOnlyBooleanProperty innerObservableNull() {
57-
return innerObservableNull;
56+
public ReadOnlyBooleanProperty innerObservablePresent() {
57+
return innerObservablePresent;
5858
}
5959

6060
@Override
61-
public boolean isInnerObservableNull() {
62-
return innerObservableNull.get();
61+
public boolean isInnerObservablePresent() {
62+
return innerObservablePresent.get();
6363
}
6464

6565
//#end IMPLEMENTATION OF 'NestedProperty'

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public class NestedStringProperty extends SimpleStringProperty implements Nested
1919
// #region PROPERTIES
2020

2121
/**
22-
* The property indicating whether the nesting's inner observable is currently null.
22+
* The property indicating whether the nesting's inner observable is currently present, i.e. not null.
2323
*/
24-
private final BooleanProperty innerObservableNull;
24+
private final BooleanProperty innerObservablePresent;
2525

2626
//#end PROPERTIES
2727

@@ -40,23 +40,23 @@ public class NestedStringProperty extends SimpleStringProperty implements Nested
4040
NestedStringProperty(Nesting<? extends Property<String>> nesting, Object bean, String name) {
4141
super(bean, name);
4242
Objects.requireNonNull(nesting, "The argument 'nesting' must not be null.");
43-
this.innerObservableNull = new SimpleBooleanProperty(this, "innerObservableNull");
43+
this.innerObservablePresent = new SimpleBooleanProperty(this, "innerObservablePresent");
4444

45-
PropertyToNestingBinding.bind(this, isNull -> innerObservableNull.set(isNull), nesting);
45+
PropertyToNestingBinding.bind(this, isPresent -> innerObservablePresent.set(isPresent), nesting);
4646
}
4747

4848
//#end CONSTUCTION
4949

5050
// #region IMPLEMENTATION OF 'NestedProperty'
5151

5252
@Override
53-
public ReadOnlyBooleanProperty innerObservableNull() {
54-
return innerObservableNull;
53+
public ReadOnlyBooleanProperty innerObservablePresent() {
54+
return innerObservablePresent;
5555
}
5656

5757
@Override
58-
public boolean isInnerObservableNull() {
59-
return innerObservableNull.get();
58+
public boolean isInnerObservablePresent() {
59+
return innerObservablePresent.get();
6060
}
6161

6262
//#end IMPLEMENTATION OF 'NestedProperty'

0 commit comments

Comments
 (0)