Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## bot.config
Class BotConfig

    java.lang.Object
      bot.config.BotConfig

    public final class BotConfig

extends java.lang.Object

This class parses the configfile of the bot and generates a Hashmap of its configuration content.

Author:
  Witthold/Korol
See Also:
  `bot.config.data.about_configuration.txt`

Nested Class Summary
`static class` | `BotConfig.Section` Sections in configFile as enums

Field Summary
`private static java.util.HashMap<java.lang.String,java.lang.String>` | `bluffing`
`private static java.util.List<java.util.HashMap<java.lang.String,java.lang.String>>` | `botConfig`
`private static java.lang.String` | `configPath`
`private static java.util.HashMap<java.lang.String,java.lang.String>` | `ext_proposal`
`private static java.util.HashMap<java.lang.String,java.lang.String>` | `gamestorage`
`private static java.util.HashMap<java.lang.String,java.lang.String>` | `general`
`private static java.util.HashMap<java.lang.String,java.lang.String>` | `opponentrecognition`
`private static java.util.HashMap<java.lang.String,java.lang.String>` | `potodds`
`private static BotConfig.Section` | `section`
`private static java.util.HashMap<java.lang.String,java.lang.String>` | `server`
`private static java.util.HashMap<java.lang.String,java.lang.String>` | `squeezing`
`private static java.util.HashMap<java.lang.String,java.lang.String>` | `startinghandchart`

Constructor Summary
`BotConfig()`

Method Summary
`private static java.util.List<java.util.HashMap<java.lang.String,java.lang.String>>` | `cleanUpBotConfig()` Cleans up the Hashmap from empty or not activated sections
`static java.util.List<java.util.HashMap<java.lang.String,java.lang.String>>` | `getBotConfig(java.lang.String configName)` Triggers the whole process of parsing, processing and converting the txt-file into a Hashmaps
`private static BotConfig.Section` | `initSection(java.lang.String line)` Initializes a section
`private static void` | `processLine(java.lang.String line)` Parses one line; distinguishes, if line starts a new section or is content of one already initialized
`private static void` | `processMyTokens(java.util.Map<java.lang.String,java.lang.String> map, java.lang.String line)` Fills the Hashmap with content
`private static void` | `readConfig(java.io.File configFile)` Parses config file

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### configPath

    private static java.lang.String configPath

### section

    private static BotConfig.Section section

### general

    private static java.util.HashMap<java.lang.String,java.lang.String> general

### server

    private static java.util.HashMap<java.lang.String,java.lang.String> server

### gamestorage

    private static java.util.HashMap<java.lang.String,java.lang.String> gamestorage

### startinghandchart

    private static java.util.HashMap<java.lang.String,java.lang.String> startinghandchart

### potodds

    private static java.util.HashMap<java.lang.String,java.lang.String> potodds

### bluffing

    private static java.util.HashMap<java.lang.String,java.lang.String> bluffing

### squeezing

    private static java.util.HashMap<java.lang.String,java.lang.String> squeezing

### opponentrecognition

    private static java.util.HashMap<java.lang.String,java.lang.String> opponentrecognition

### ext_proposal

    private static java.util.HashMap<java.lang.String,java.lang.String> ext_proposal

### botConfig

    private static java.util.List<java.util.HashMap<java.lang.String,java.lang.String>> botConfig

Constructor Detail

### BotConfig

    public BotConfig()

Method Detail

### readConfig

    private static final void readConfig(java.io.File configFile)
                                  throws java.io.FileNotFoundException

  Parses config file

  Parameters:
    `configFile` -
  Throws:
    `java.io.FileNotFoundException`

### processLine

    private static void processLine(java.lang.String line)

  Parses one line; distinguishes, if line starts a new section or is content of one already initialized

  Parameters:
    `String` - line in configFile

### initSection

    private static BotConfig.Section initSection(java.lang.String line)

  Initializes a section

  Parameters:
    `String` - line in configFile
  Returns:
    specific Section

### processMyTokens

    private static void processMyTokens(java.util.Map<java.lang.String,java.lang.String> map,
                                        java.lang.String line)

  Fills the Hashmap with content

  Parameters:
    `map` -
    `line` -

### cleanUpBotConfig

    private static java.util.List<java.util.HashMap<java.lang.String,java.lang.String>> cleanUpBotConfig()

  Cleans up the Hashmap from empty or not activated sections

  Returns:
    botConfig - filled only with activated sections or GENERAL

### getBotConfig

    public static java.util.List<java.util.HashMap<java.lang.String,java.lang.String>> getBotConfig(java.lang.String configName)
                                                                                             throws java.io.FileNotFoundException

  Triggers the whole process of parsing, processing and converting the txt-file into a Hashmaps

  Parameters:
    `configName` - -
  Returns:
    the botConfig as ArrayList>
  Throws:
    `java.io.FileNotFoundException` - -

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD