Class AgentField.ImmutableAgentField

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

public static class AgentField.ImmutableAgentField extends Object implements AgentField
See Also:
  • Constructor Details

    • ImmutableAgentField

      public ImmutableAgentField(String value, long confidence, boolean isDefaultValue, String defaultValue)
    • ImmutableAgentField

      public ImmutableAgentField(AgentField agentField)
  • Method Details

    • 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
    • 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.
    • 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.
    • 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