Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/backend/Palina.java
Show All 14 Lines | BusTO (backend components) | ||||
You should have received a copy of the GNU General Public License | You should have received a copy of the GNU General Public License | ||||
along with this program. If not, see <http://www.gnu.org/licenses/>. | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
package it.reyboz.bustorino.backend; | package it.reyboz.bustorino.backend; | ||||
import android.util.Log; | import android.util.Log; | ||||
import androidx.annotation.NonNull; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.Calendar; | import java.util.Calendar; | ||||
import java.util.Collections; | import java.util.Collections; | ||||
import java.util.List; | import java.util.List; | ||||
/** | /** | ||||
* Timetable for multiple routes.<br> | * Timetable for multiple routes.<br> | ||||
* <br> | * <br> | ||||
▲ Show 20 Lines • Show All 137 Lines • ▼ Show 20 Lines | protected void checkPassaggi(){ | ||||
mSource = Passaggio.Source.UNDETERMINED; | mSource = Passaggio.Source.UNDETERMINED; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
if(mSource == Passaggio.Source.UNDETERMINED) | if(mSource == Passaggio.Source.UNDETERMINED) | ||||
break; | break; | ||||
} | } | ||||
// if the Source is still null, set undetermined | |||||
if (mSource == null) mSource = Passaggio.Source.UNDETERMINED; | |||||
//finished with the check, setting flags | //finished with the check, setting flags | ||||
routesModified = false; | routesModified = false; | ||||
allSource = mSource; | allSource = mSource; | ||||
} | } | ||||
@NonNull | |||||
public Passaggio.Source getPassaggiSourceIfAny(){ | public Passaggio.Source getPassaggiSourceIfAny(){ | ||||
if(allSource==null || routesModified){ | if(allSource==null || routesModified){ | ||||
checkPassaggi(); | checkPassaggi(); | ||||
} | } | ||||
assert allSource != null; | assert allSource != null; | ||||
return allSource; | return allSource; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 153 Lines • ▼ Show 20 Lines | |||||
// * | // * | ||||
// * @return times from the timetable | // * @return times from the timetable | ||||
// */ | // */ | ||||
// public List<Passaggio> getPassaggi() { | // public List<Passaggio> getPassaggi() { | ||||
// return this.passaggi; | // return this.passaggi; | ||||
// } | // } | ||||
// } | // } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register