Back to project page MassRoute.
The source code is released under:
Copyright (c) 2010 Todd Anderson http://www.custardbelly.com/blog Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (th...
If you think the Android project MassRoute listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.custardbelly.massdot.model; /*w w w.j a va 2s .c o m*/ import java.util.List; public class MassRouteModel { private List<Route> _availableRoutes; private Route _selectedRoute; private RouteConfig _selectedRouteConfig; private RouteDirection _selectedRouteDirection; private RouteStop _selectedRouteStop; private List<RouteStop> _selectedRouteStops; private Boolean _requiresSelectedStopsRefresh; private MassRouteModel() {} static private MassRouteModel _instance; static public MassRouteModel instance() { if( _instance == null ) { _instance = new MassRouteModel(); } return _instance; } public List<RouteStop> getSelectedRouteStops() { if( _selectedRouteStops == null || _requiresSelectedStopsRefresh ) { _selectedRouteStops = _selectedRouteConfig.getStopsFromDirection( _selectedRouteDirection ); _requiresSelectedStopsRefresh = false; } return _selectedRouteStops; } public Route getSelectedRoute() { return _selectedRoute; } public void setSelectedRoute(Route value) { _selectedRoute = value; _requiresSelectedStopsRefresh = true; } public RouteConfig getSelectedRouteConfig() { return _selectedRouteConfig; } public void setSelectedRouteConfig(RouteConfig value) { _selectedRouteConfig = value; _requiresSelectedStopsRefresh = true; } public RouteDirection getSelectedRouteDirection() { return _selectedRouteDirection; } public void setSelectedRouteDirection(RouteDirection value) { _selectedRouteDirection = value; _requiresSelectedStopsRefresh = true; } public RouteStop getSelectedRouteStop() { return _selectedRouteStop; } public void setSelectedRouteStop( RouteStop value ) { _selectedRouteStop = value; } public List<Route> getAvailableRoutes() { return _availableRoutes; } public void setAvailableRoutes( List<Route> value ) { _availableRoutes = value; } }