package Ġcom . f eli pec sl . elif ut . models Ċ Ċ import Ġcom . f eli pec sl . elif ut . util . sort Ċ Ċ /** ĠFilters Ġthe Ġprovided Ġlist Ġof Ġplayers Ġby Ġreturns Ġonly Ġdef enders Ġin Ġthat Ġlist Ġ Ġ*/ Ċ fun ĠList < Player >. def enders (): ĠList < Player > Ġ{ ĊĠ Ġreturn Ġfilter By Position ( Player . DEF ENDER _ POSITION S ) Ċ } Ċ Ċ /** ĠFilters Ġthe Ġprovided Ġlist Ġof Ġplayers Ġby Ġreturns Ġonly Ġmid field ers Ġin Ġthat Ġlist Ġ Ġ*/ Ċ fun ĠList < Player >. mid field ers (): ĠList < Player > Ġ{ ĊĠ Ġreturn Ġfilter By Position ( Player . MID FI EL DER _ POSITION S ) Ċ } Ċ Ċ /** ĠFilters Ġthe Ġprovided Ġlist Ġof Ġplayers Ġby Ġreturns Ġonly Ġattack ers Ġin Ġthat Ġlist Ġ Ġ*/ Ċ fun ĠList < Player >. attack ers (): ĠList < Player > Ġ{ ĊĠ Ġreturn Ġfilter By Position ( Player . ATT ACK ER _ POSITION S ) Ċ } Ċ Ċ fun ĠList < Player >. goal ke e pers (): ĠList < Player > Ġ{ ĊĠ Ġreturn Ġfilter By Position ( Player . GO AL KE E PER _ POSITION S ) Ċ } Ċ Ċ private Ġfun ĠList < Player >. filter By Position ( poss ibilities : ĠList < String >): ĠList < Player > Ġ{ ĊĠ Ġreturn Ġfilter Ġ{ Ġp Ġ-> Ġpossib ilities . indexOf ( p . position ()) Ġ!= Ġ- 1 Ġ}. sort ( Player . PLAYER _ COMP AR ATOR ) Ċ }