-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for custom predicate for mixed lines
- Loading branch information
Showing
16 changed files
with
164 additions
and
35 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 was deleted.
Oops, something went wrong.
3 changes: 2 additions & 1 deletion
3
src/test/java/AbstractPerson.java → ...y/vitaliy/fixedlength/AbstractPerson.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
3 changes: 2 additions & 1 deletion
3
src/test/java/CatMixed.java → ...ikodniy/vitaliy/fixedlength/CatMixed.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
3 changes: 2 additions & 1 deletion
3
src/test/java/Employee.java → ...ikodniy/vitaliy/fixedlength/Employee.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
3 changes: 2 additions & 1 deletion
3
src/test/java/EmployeeMixed.java → ...iy/vitaliy/fixedlength/EmployeeMixed.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
15 changes: 15 additions & 0 deletions
15
src/test/java/name/velikodniy/vitaliy/fixedlength/EmployeePosition.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,15 @@ | ||
package name.velikodniy.vitaliy.fixedlength; | ||
|
||
import name.velikodniy.vitaliy.fixedlength.annotation.FixedField; | ||
import name.velikodniy.vitaliy.fixedlength.annotation.FixedLine; | ||
|
||
@FixedLine(predicate = EmployeePositionPredicate.class) | ||
public class EmployeePosition { | ||
|
||
@FixedField(offset = 1, length = 10, align = Align.LEFT) | ||
private String position; | ||
|
||
public String getPosition() { | ||
return position; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/test/java/name/velikodniy/vitaliy/fixedlength/EmployeePositionPredicate.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,11 @@ | ||
package name.velikodniy.vitaliy.fixedlength; | ||
|
||
import java.util.function.Predicate; | ||
|
||
public class EmployeePositionPredicate implements Predicate<String> { | ||
|
||
@Override | ||
public boolean test(String s) { | ||
return s.contains("POSITION"); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/test/java/name/velikodniy/vitaliy/fixedlength/EmployeeWithEmptyAnnotation.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 name.velikodniy.vitaliy.fixedlength; | ||
|
||
import name.velikodniy.vitaliy.fixedlength.annotation.FixedField; | ||
import name.velikodniy.vitaliy.fixedlength.annotation.FixedLine; | ||
|
||
@FixedLine | ||
public class EmployeeWithEmptyAnnotation implements Row { | ||
@FixedField(offset = 1, length = 10, align = Align.LEFT) | ||
public String firstName; | ||
|
||
@FixedField(offset = 11, length = 10, align = Align.LEFT) | ||
String lastName; | ||
} |
3 changes: 2 additions & 1 deletion
3
src/test/java/FormatterTest.java → ...iy/vitaliy/fixedlength/FormatterTest.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
2 changes: 2 additions & 0 deletions
2
src/test/java/HeaderSplit.java → ...dniy/vitaliy/fixedlength/HeaderSplit.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
3 changes: 2 additions & 1 deletion
3
src/test/java/InheritedEmployee.java → ...italiy/fixedlength/InheritedEmployee.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package name.velikodniy.vitaliy.fixedlength; | ||
|
||
public interface Row { | ||
} |