Class StringToIntMapClient

java.lang.Object
it.unimi.di.prog2.s12.StringToIntMapClient

public class StringToIntMapClient extends Object
A class to exercise some methods of StringToIntMap.
  • Constructor Details

    • StringToIntMapClient

      private StringToIntMapClient()
      .
  • Method Details

    • main

      public static void main(String[] args)
      A simple client to test the StringToIntMap class.

      The client reads lines from the standard input, where each line is a command followed by some arguments. The commands are:

      • + key value to add or replace a key-value pair to the map;
      • - key to remove the key from the map;
      • ? key to get the value associated to the key;
      • c to clear the map;
      • # to get the size of the map.

      The client emits in the standard output the value returned by performing the action requested by the commands.

      Parameters:
      args - not used.