Class Config

java.lang.Object
org.bytemechanics.config.manager.Config
All Implemented Interfaces:
java.lang.Comparable<Config>

public class Config
extends java.lang.Object
implements java.lang.Comparable<Config>
Configuration bean
Author:
afarre
See Also:
Comparable
  • Constructor Summary

    Constructors 
    Constructor Description
    Config​(java.lang.String _key, java.lang.String _value)
    Builds configuraiton from the given key/value pairs
  • Method Summary

    Modifier and Type Method Description
    int compareTo​(Config _other)  
    boolean equals​(java.lang.Object _other)  
    java.lang.String getKey()
    Retrieve key value
    java.lang.String getValue()
    Retrieve value
    int hashCode()  
    static Config of​(java.lang.String _key, java.lang.String _value)
    Utility method to call constructor without new
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Config

      public Config​(java.lang.String _key, java.lang.String _value)
      Builds configuraiton from the given key/value pairs
      Parameters:
      _key - key to store
      _value - value to store
      Throws:
      java.lang.NullPointerException - if the given _key is null
  • Method Details

    • getKey

      public java.lang.String getKey()
      Retrieve key value
      Returns:
      configuration key value
    • getValue

      public java.lang.String getValue()
      Retrieve value
      Returns:
      configuration value
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
      See Also:
      Object.hashCode()
    • equals

      public boolean equals​(java.lang.Object _other)
      Overrides:
      equals in class java.lang.Object
      See Also:
      Object.equals(java.lang.Object)
    • compareTo

      public int compareTo​(Config _other)
      Specified by:
      compareTo in interface java.lang.Comparable<Config>
      See Also:
      Object.equals(java.lang.Object)
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • of

      public static final Config of​(java.lang.String _key, java.lang.String _value)
      Utility method to call constructor without new
      Parameters:
      _key - key to store
      _value - value to store
      Returns:
      new Config created
      Throws:
      java.lang.NullPointerException - if the given _key is null