src/main/java/pt/it/av/tnav/ml/tm/tokenizer/PlainTextTokenizer.java
public synchronized static Tokenizer build() {
    Tokenizer rv = null;
    if (wrt == null) {
      rv = new PlainTextTokenizer();
      wrt = new WeakReference<>(rv);
    } else {
      rv = wrt.get();
      if(rv == null) {
        rv = new PlainTextTokenizer();
        wrt = new WeakReference<>(rv);
      }
    }
    return rv;
  }
/**
   * Builds a static {@link WeakReference} to a {@link Tokenizer} class.
   * <p>
   *   This method should be used whenever the {@link Tokenizer} will be built and destroy multiple times.
   *   It will also share a single stemmer through several process/threads.
   * </p>
   *
   * @return {@link Tokenizer} reference that points to a {@link PlainTextTokenizer}
   */
Builds a static  WeakReference to a  Tokenizer class.

This method should be used whenever the  Tokenizer will be built and destroy multiple times.
It will also share a single stemmer through several process/threads.

@return  Tokenizer reference that points to a  PlainTextTokenizer
Builds a static WeakReference to a Tokenizer class . This method should be used whenever the Tokenizer will be built and destroy multiple times . It will also share a single stemmer through several process / threads . @return Tokenizer reference that points to a PlainTextTokenizer
public synchronized static Tokenizer build() {
    Tokenizer rv = null;
    if (wrt == null) {
      rv = new PlainTextTokenizer();
      wrt = new WeakReference<>(rv);
    } else {
      rv = wrt.get();
      if(rv == null) {
        rv = new PlainTextTokenizer();
        wrt = new WeakReference<>(rv);
      }
    }
    return rv;
  }
public synchronized static Tokenizer build ( ) { Tokenizer rv = null ; if ( wrt == null ) { rv = new PlainTextTokenizer ( ) ; wrt = new WeakReference < > ( rv ) ; } else { rv = wrt . get ( ) ; if ( rv == null ) { rv = new PlainTextTokenizer ( ) ; wrt = new WeakReference < > ( rv ) ; } } return rv ; }
Builds a static {@link WeakReference} to a {@link Tokenizer} class.
Builds a static { @link WeakReference } to a { @link Tokenizer } class .