Class Facet

  • All Implemented Interfaces:
    java.io.Serializable

    public class Facet
    extends java.lang.Object
    implements java.io.Serializable
    This object is the list of facets that the user has selected in the UI to narrow down the search of products
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      Facet()
      Creates a new instance of an ItemFacet with an empty list of values.
      Facet​(java.lang.String code, java.lang.String name)
      Creates a new instance of an ItemFacet with a specified code and name.
      Facet​(java.lang.String code, java.lang.String name, java.util.List<java.lang.String> values)
      Creates a new instance of an ItemFacet with a specific code, name and initial values.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addValue​(java.lang.String value)
      Adds a specified facet value to the list of values represented by this current facet.
      boolean equals​(java.lang.Object object)  
      java.lang.String getCode()  
      java.lang.String getName()  
      java.util.List<java.lang.String> getValues()  
      int hashCode()  
      void setCode​(java.lang.String code)  
      void setName​(java.lang.String name)  
      void setValues​(java.util.List<java.lang.String> values)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • Facet

        public Facet()
        Creates a new instance of an ItemFacet with an empty list of values.
      • Facet

        public Facet​(java.lang.String code,
                     java.lang.String name)
        Creates a new instance of an ItemFacet with a specified code and name.
        Parameters:
        code - a String containing the code for the specific facet.
        name - the name of the specific facet.
      • Facet

        public Facet​(java.lang.String code,
                     java.lang.String name,
                     java.util.List<java.lang.String> values)
        Creates a new instance of an ItemFacet with a specific code, name and initial values.
        Parameters:
        code - a String containing the code for the specific facet.
        name - the name of the specific facet.
        values - a list of the values we want to store against this facet.
    • Method Detail

      • setCode

        public void setCode​(java.lang.String code)
      • getCode

        public java.lang.String getCode()
      • setName

        public void setName​(java.lang.String name)
      • getName

        public java.lang.String getName()
      • setValues

        public void setValues​(java.util.List<java.lang.String> values)
      • addValue

        public void addValue​(java.lang.String value)
        Adds a specified facet value to the list of values represented by this current facet.
        Parameters:
        value - the facet value to add to the list.
      • getValues

        public java.util.List<java.lang.String> getValues()
      • hashCode

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

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • toString

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