Naming Conventions

  • We follow the Naming Conventions from Sun's Java Code Conventions.
    Short version: Use CamelCase in general, with:
    • Classes and Interfaces starting with uppercase letters
    • Methods, packages and variables/members starting with lowercase letters
    • Constants use all-uppercase letters together with underscores ("_").
  • Abbrevations should be avoided:
    • getTravTime()  >>  getTravelTime()
    • getDist()  >>  getDistance()
  • Id is an abbreviation for Identifier, the 'd' is thus usually a lowercase letter.
  • Factory methods are named create*(), e.g. createLink(). newLink() or other names should be avoided.
  • Abstract classes should start with Abstract, e.g. AbstractPersonAlgorithm.
  • Interfaces are not specially marked in their name, e.g. there is no pre- or suffix I like SomeInterfaceI.
  • Default Implementations of interfaces end on Impl, if no more specific class-name is suitable, e.g. PlanImpl implements Plan.

 


Warning: Table 'watchdog' is read only query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Table &amp;#039;sessions&amp;#039; is read only\nquery: UPDATE sessions SET uid = 0, cache = 0, hostname = &amp;#039;38.107.179.230&amp;#039;, session = &amp;#039;&amp;#039;, timestamp = 1328356416 WHERE sid = &amp;#039;e972b2ab7dd755a2094beea8ac708f02&amp;#039;</em> in <em>/home01/vsp_access/matsimwww/includes/database.mysql.inc</em> on line <em>174</em>.', 2, '', 'http://matsim.org/node/274', '', '38.107.179.230', 1328356416) in /home01/vsp_access/matsimwww/includes/database.mysql.inc on line 174