Created
October 27, 2017 14:20
-
-
Save inog/93e0e13a418d46c2695e78b70b32a463 to your computer and use it in GitHub Desktop.
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
package streams; | |
import java.util.Arrays; | |
import java.util.List; | |
public class Java8Filter { | |
private static List<kabnr> kabnrs = Arrays.asList( | |
new kabnr(1234,0,2017, "1234"), | |
new kabnr(1234,0,2017, "1590"), | |
new kabnr(1234,0,2017, "1591"), | |
new kabnr(1234,0,2017, "3456") | |
); | |
private static List<Vdrau> vdraus = Arrays.asList( | |
new Vdrau(1234,0, "3456"), | |
new Vdrau(1234,0, "1592"), | |
new Vdrau(1234,0, "1590"), | |
new Vdrau(1234,0, "1593"), | |
new Vdrau(1234,0, "1594") | |
); | |
} |
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
package streams; | |
public class kabnr { | |
private int kan1; | |
private int kan2; | |
private String abnr; | |
public kabnr(int kan1, int kan2, int kjah, String abnr) { | |
this.kan1 = kan1; | |
this.kan2 = kan2; | |
this.abnr = abnr; | |
} | |
/** | |
* @return the kan1 | |
*/ | |
public int getKan1() { | |
return kan1; | |
} | |
/** | |
* @param kan1 the kan1 to set | |
*/ | |
public void setKan1(int kan1) { | |
this.kan1 = kan1; | |
} | |
/** | |
* @return the kan2 | |
*/ | |
public int getKan2() { | |
return kan2; | |
} | |
/** | |
* @param kan2 the kan2 to set | |
*/ | |
public void setKan2(int kan2) { | |
this.kan2 = kan2; | |
} | |
/** | |
* @return the abnr | |
*/ | |
public String getAbnr() { | |
return abnr; | |
} | |
/** | |
* @param abnr the abnr to set | |
*/ | |
public void setAbnr(String abnr) { | |
this.abnr = abnr; | |
} | |
/* (non-Javadoc) | |
* @see java.lang.Object#toString() | |
*/ | |
@Override | |
public String toString() { | |
return "kabnr [kan1=" + kan1 + ", kan2=" + kan2 + ", abnr=" + abnr + "]"; | |
} | |
public boolean isPrintKabnrn() { | |
return abnr.startsWith("159"); | |
} | |
} |
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
package streams; | |
public class Vdrau { | |
private int kan1; | |
private int kan2; | |
private String abnr; | |
public Vdrau(int kan1, int kan2, String abnr) { | |
this.kan1 = kan1; | |
this.kan2 = kan2; | |
this.abnr = abnr; | |
} | |
/** | |
* @return the kan1 | |
*/ | |
public int getKan1() { | |
return kan1; | |
} | |
/** | |
* @param kan1 the kan1 to set | |
*/ | |
public void setKan1(int kan1) { | |
this.kan1 = kan1; | |
} | |
/** | |
* @return the kan2 | |
*/ | |
public int getKan2() { | |
return kan2; | |
} | |
/** | |
* @param kan2 the kan2 to set | |
*/ | |
public void setKan2(int kan2) { | |
this.kan2 = kan2; | |
} | |
/** | |
* @return the abnr | |
*/ | |
public String getAbnr() { | |
return abnr; | |
} | |
/** | |
* @param abnr the abnr to set | |
*/ | |
public void setAbnr(String abnr) { | |
this.abnr = abnr; | |
} | |
/* (non-Javadoc) | |
* @see java.lang.Object#toString() | |
*/ | |
@Override | |
public String toString() { | |
return "Vdrau [kan1=" + kan1 + ", kan2=" + kan2 + ", abnr=" + abnr + "]"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment