001 002package com.commercetools.api.models.product; 003 004import java.time.*; 005import java.util.*; 006 007import com.fasterxml.jackson.annotation.JsonCreator; 008import com.fasterxml.jackson.databind.annotation.*; 009 010import io.vrap.rmf.base.client.ModelBase; 011import io.vrap.rmf.base.client.utils.Generated; 012 013import org.apache.commons.lang3.builder.EqualsBuilder; 014import org.apache.commons.lang3.builder.HashCodeBuilder; 015 016/** 017 * <p>Creates tokens by splitting the <code>text</code> field in SearchKeyword by whitespaces.</p> 018 */ 019@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 020public class WhitespaceTokenizerImpl implements WhitespaceTokenizer, ModelBase { 021 022 private String type; 023 024 /** 025 * create instance with all properties 026 */ 027 @JsonCreator 028 WhitespaceTokenizerImpl() { 029 this.type = WHITESPACE; 030 } 031 032 /** 033 * 034 */ 035 036 public String getType() { 037 return this.type; 038 } 039 040 @Override 041 public boolean equals(Object o) { 042 if (this == o) 043 return true; 044 045 if (o == null || getClass() != o.getClass()) 046 return false; 047 048 WhitespaceTokenizerImpl that = (WhitespaceTokenizerImpl) o; 049 050 return new EqualsBuilder().append(type, that.type).isEquals(); 051 } 052 053 @Override 054 public int hashCode() { 055 return new HashCodeBuilder(17, 37).append(type).toHashCode(); 056 } 057 058}