Comments (5)
Possibly add internal interface method init()
to initialize and update objects, rather than seting the value directly on the variable and instantiation.
This could open the door to using protected/package-private initializers.
ex: instead of copying and pasting the static route initialization across all route implementations, use a single initializer RouteSchema#init(Route route)
and set the values using route.??? = ???
OneMTA/src/main/java/dev/katsute/onemta/MTASchema_Bus.java
Lines 107 to 114 in efe23fe
vs
protected final String routeID = id;
protected final String routeShortName;
protected final String routeLongName;
protected final String routeDesc;
protected final String routeColor;
protected final String routeTextColor;
protected final void init(Route route){
route.routeShortName = row.get(csv.getHeaderIndex("route_short_name"));
...
}
from onemta.
Only realtime data should be updated, static data should be final. Any arrays should also be regenerated and reassigned, don't update existing arrays.
from onemta.
First comment method can't be used, protected variables in abstract is not allowed.
Instead move update method to the alerts and vehicles array method. Have optional param update?
to determine if class should regenerated arrays, rather than using existing; again use new array, do not update old one.
from onemta.
@sinon-bot branch refresh
from onemta.
New branch created refresh@efe23fe
This branch was created by @Katsute.
from onemta.
Related Issues (19)
- Use GTFS bus feeds HOT 4
- Stop description not used
- Move test resource download to bash script
- Alert description is null HOT 1
- Arrival/departure time is incorrect HOT 2
- Add support for station transfer data HOT 6
- Add method to check if subway is express HOT 2
- Alert start/end periods are incorrect HOT 2
- Utility methods HOT 2
- Invalid LineRef for Bus Company HOT 2
- Update tests causing issues HOT 2
- Cancelled Trip API HOT 2
- Document enums HOT 4
- zip files for MTA busses have changed HOT 1
- (internal) zip changes for MTA bus static data HOT 5
- Use all bus data HOT 10
- Optimize data resource + CSV searches HOT 2
- Failing to `resolveSubwayFeed` on express routes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onemta.