Class CommentedWrapper

java.lang.Object
space.arim.dazzleconf.factory.CommentedWrapper

public final class CommentedWrapper extends Object
A simple wrapper used to attach comments to a configuration wrapper. Often requires special treatment when handling configuration maps.
Author:
A248
  • Constructor Details

    • CommentedWrapper

      public CommentedWrapper(List<String> comments, Object value)
      Creates from a list of comments and a value
      Parameters:
      comments - the comments
      value - the value
      Throws:
      NullPointerException - if value or comments or any element in comments is null
  • Method Details

    • getComments

      public List<String> getComments()
      Gets the comments, which come before the value
      Returns:
      the comments
    • getValue

      public Object getValue()
      Gets the config value
      Returns:
      the value
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object