title: Java map.get(map.put(String, boolean)), what is its meaning?
body: <p>I am following a tutorial and I met these instructions:</p>
  
  <pre><code>public class WorldController {
      enum Keys {
          LEFT,
          RIGHT,
          JUMP,
          FIRE
      }
  
      private World world;
  
      static Map&lt;Keys, Boolean&gt; keys = new HashMap&lt;Keys, Boolean&gt;();
      static {
          keys.put(Keys.LEFT, false);
          keys.put(Keys.RIGHT, false);
          keys.put(Keys.JUMP, false);
          keys.put(Keys.FIRE, false);
      };
  
      public WorldController(World world) {
          this.world = world;
      }
  
      // ** Key presses and touches **************** //
      public void leftPressed() {
          keys.get(keys.put(Keys.LEFT, true));
      }
      public void rightPressed() {
          keys.get(keys.put(Keys.RIGHT, true));
      }
      public void jumpPressed() {
          keys.get(keys.put(Keys.JUMP, true));
      }
      public void firePressed() {
          keys.get(keys.put(Keys.FIRE, false));
      }
  
      public void leftReleased() {
          keys.get(keys.put(Keys.LEFT, false));
      }
      public void rightReleased() {
          keys.get(keys.put(Keys.RIGHT, false));
      }
      public void jumpReleased() {
          keys.get(keys.put(Keys.JUMP, false));
      }
      public void fireReleased() {
          keys.get(keys.put(Keys.FIRE, false));
      }
  }
  </code></pre>
  
  <p>As I can see the methods <code>leftPressed()</code>, <code>rightPressed()</code>, etc return nothing. Is there any particular reason why it puts and immediately gets the value (without returning it)?</p>