-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
285 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...main/java/com/github/rutledgepaulv/qbuilders/delegates/concrete/EnumPropertyDelegate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.github.rutledgepaulv.qbuilders.delegates.concrete; | ||
|
||
import com.github.rutledgepaulv.qbuilders.builders.QBuilder; | ||
import com.github.rutledgepaulv.qbuilders.delegates.virtual.ListablePropertyDelegate; | ||
import com.github.rutledgepaulv.qbuilders.properties.concrete.EnumProperty; | ||
|
||
public final class EnumPropertyDelegate<T extends QBuilder<T>, S extends Enum<S>> | ||
extends ListablePropertyDelegate<T,S> implements EnumProperty<T,S> { | ||
|
||
public EnumPropertyDelegate(String field, T canonical) { | ||
super(field, canonical); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 22 additions & 2 deletions
24
src/main/java/com/github/rutledgepaulv/qbuilders/nodes/LogicalNode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,31 @@ | ||
package com.github.rutledgepaulv.qbuilders.nodes; | ||
|
||
import java.util.LinkedList; | ||
import java.util.List; | ||
|
||
public abstract class LogicalNode extends AbstractNode { | ||
|
||
public LogicalNode(AbstractNode parent, List<AbstractNode> children) { | ||
super(parent, children); | ||
private List<AbstractNode> children = new LinkedList<>(); | ||
|
||
public LogicalNode() {} | ||
|
||
public LogicalNode(LogicalNode parent) { | ||
super(parent); | ||
} | ||
|
||
public LogicalNode(LogicalNode parent, List<AbstractNode> children) { | ||
super(parent); | ||
setChildren(children); | ||
} | ||
|
||
public List<AbstractNode> getChildren() { | ||
return children; | ||
} | ||
|
||
public void setChildren(List<AbstractNode> children) { | ||
this.children = children; | ||
children.forEach(child -> child.setParent(this)); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/java/com/github/rutledgepaulv/qbuilders/properties/concrete/EnumProperty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.github.rutledgepaulv.qbuilders.properties.concrete; | ||
|
||
import com.github.rutledgepaulv.qbuilders.builders.QBuilder; | ||
import com.github.rutledgepaulv.qbuilders.properties.virtual.EquitableProperty; | ||
import com.github.rutledgepaulv.qbuilders.properties.virtual.ListableProperty; | ||
|
||
/** | ||
* A property view for fields with {@link Enum} values. | ||
* | ||
* @param <T> The type of the final builder. | ||
*/ | ||
public interface EnumProperty<T extends QBuilder<T>, S extends Enum<S>> | ||
extends ListableProperty<T,S>, EquitableProperty<T, S> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.