Class AgentField.MutableAgentField

java.lang.Object
nl.basjes.parse.useragent.AgentField.MutableAgentField
All Implemented Interfaces:
Serializable, AgentField
Enclosing interface:
AgentField

public static class AgentField.MutableAgentField extends Object implements AgentField
See Also:
  • Method Details

    • reset

      public void reset()
    • getValue

      public String getValue()
      Description copied from interface: AgentField
      What is the value we have for this field? If we do not know you'll get the default value that has been defined (which may be null).
      Specified by:
      getValue in interface AgentField
    • isDefaultValue

      public boolean isDefaultValue()
      Specified by:
      isDefaultValue in interface AgentField
      Returns:
      Is the value you are getting the default (i.e. we do not know what this is)?
    • getDefaultValue

      public String getDefaultValue()
      Specified by:
      getDefaultValue in interface AgentField
      Returns:
      The default value for this field in case we do not know what this is.
    • getConfidence

      public long getConfidence()
      Specified by:
      getConfidence in interface AgentField
      Returns:
      How certain are we about this value? <0 : We are uncertain. 0>= : The higher the more confident.
    • setValue

      public boolean setValue(AgentField.MutableAgentField field)
    • setValue

      public boolean setValue(String newValue, long newConfidence)
    • setValueForced

      public void setValueForced(String newValue, long newConfidence)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object