package ua.yandex.shad.tries;

public class Tuple {
    public final String term;
    public final int weight;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        Tuple tuple = (Tuple) o;

        if (weight != tuple.weight) {
            return false;
        }
        if (term != null) {
            return term.equals(tuple.term);
        } else {
            return tuple.term == null;
        }
    }

    @Override
    public int hashCode() {
        int result = 0;
        if (term != null) {
            result = term.hashCode();
        }
        result = 31 * result + weight;
        return result;
    }

    public Tuple(String term, int weight) {
        this.term = term;
        this.weight = weight;
    }
}

@@ -46,29 +46,30 @@
 uple %7B%0A    p
-ublic
+rivate
  final Strin
@@ -85,31 +85,139 @@
    p
-ublic final int weight;
+rivate final int weight;%0A%0A    public Tuple(String term, int weight) %7B%0A        this.term = term;%0A        this.weight = weight;%0A    %7D
 %0A%0A  
@@ -885,38 +885,32 @@
   %7D%0A%0A    public 
-Tuple(
 String term, int
@@ -900,36 +900,25 @@
  String term
-, int weight
+(
 ) %7B%0A        
@@ -913,35 +913,30 @@
 ) %7B%0A        
-this.term =
+return
  term;%0A     
@@ -934,33 +934,59 @@
 rm;%0A    
+%7D%0A%0A
     
-this.weight =
+public int weight() %7B%0A        return
  weight;

Fix some checkstyle warnings.