Class MicLookup

java.lang.Object
com.apptasticsoftware.mic.MicLookup

public class MicLookup extends Object
Class for doing Market Identifier Codes (MIC) lookup.
  • Method Details

    • getInstance

      public static MicLookup getInstance()
      Get instance for doing MIC lookups. It will try and download a list of the latest MICs. If download fails an offline list of MICs will be used.
      Returns:
      instance
    • getInstance

      public static MicLookup getInstance(boolean download) throws IOException
      Get instance for doing MIC lookups.
      Parameters:
      download - - if true the latest list of MICs will be downloaded. Otherwise, an offline list is used
      Returns:
      instance
      Throws:
      IOException - exception
    • isDownloaded

      public boolean isDownloaded()
      Check if a list of the latest mic was downloaded.
      Returns:
      true if download the latest MICs otherwise false
    • size

      public int size()
      Number of MICs.
      Returns:
      size
    • getMic

      public Optional<Mic> getMic(String mic)
      Get MIC entry by mic code.
      Parameters:
      mic - - MIC code
      Returns:
      mic
    • getMicByOperationalMic

      public List<Mic> getMicByOperationalMic(String operationalMic)
      Get all MIC entries for a give operational MIC.
      Parameters:
      operationalMic - operational mic
      Returns:
      stream of MIC entries
    • getMicByCountryCode

      public List<Mic> getMicByCountryCode(String countryCode)
      Get all MIC entries for a give country code.
      Parameters:
      countryCode - country code
      Returns:
      stream of MIC entries
    • getAll

      public List<Mic> getAll()
      Get all known MIC entries.
      Returns:
      stream of MIC entries