package com.pengyifan.nlp.trees;

import org.apache.commons.lang3.Validate;

import com.google.inject.Inject;

import edu.stanford.nlp.trees.GrammaticalStructure;
import edu.stanford.nlp.trees.GrammaticalStructureFactory;
import edu.stanford.nlp.trees.Tree;

public class GrammaticalStructureBuilder {

  private final GrammaticalStructureFactory grammaticalStructureFactory;
  
  @Inject
  public GrammaticalStructureBuilder(
      GrammaticalStructureFactory grammaticalStructureFactory) {
    this.grammaticalStructureFactory = grammaticalStructureFactory;
  }
  
  public GrammaticalStructure build(Tree tree) {
    Validate.notNull(tree, "Tree is null");
    return grammaticalStructureFactory
        .newGrammaticalStructure(tree);
  }

}

@@ -38,75 +38,64 @@
 ort 
-org.apache.commons.lang3.Validate;%0A%0Aimport com.google.inject.Inject
+static com.google.common.base.Preconditions.checkNotNull
 ;%0A%0Ai
@@ -365,18 +365,8 @@
 %0A  %0A
-  @Inject%0A
   pu
@@ -596,18 +596,14 @@
     
-Validate.n
+checkN
 otNu

change gs builder