// Copyright 2014 takahashikzn
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package jp.root42.indolently.ref;

/**
 * @param <T> value type
 * @author takahashikzn
 */
public class CmpRef<T extends Comparable<T>>
    extends Ref<T>
    implements Comparable<T> {

    private static final long serialVersionUID = 8031677453769730996L;

    /**
     * constructor.
     */
    public CmpRef() {
    }

    /**
     * constructor.
     *
     * @param val the value.
     */
    public CmpRef(final T val) {
        super(val);
    }

    @Override
    public int compareTo(final T that) {
        return this.get().compareTo(that);
    }
}

@@ -613,16 +613,85 @@
 y.ref;%0A%0A
+import java.util.Objects;%0A%0Aimport jp.root42.indolently.Indolently;%0A%0A%0A
 /**%0A * @
@@ -829,17 +829,43 @@
 parable%3C
-T
+ValueReference%3C? extends T%3E
 %3E %7B%0A%0A   
@@ -1175,17 +1175,43 @@
 o(final 
-T
+ValueReference%3C? extends T%3E
  that) %7B
@@ -1251,16 +1251,1146 @@
 eTo(that
+.get());%0A    %7D%0A%0A    /**%0A     * test if value is equivalent or not.%0A     *%0A     * @param val value to compare.%0A     * @return test result%0A     */%0A    public boolean equalTo(final T val) %7B%0A        return Objects.equals(this.get(), val);%0A    %7D%0A%0A    /**%0A     * compute largest value.%0A     *%0A     * @param that comparison target%0A     * @return largest value.%0A     */%0A    public T max(final ValueReference%3C? extends T%3E that) %7B%0A        return Indolently.max(this.get(), that.get());%0A    %7D%0A%0A    /**%0A     * compute largest value.%0A     *%0A     * @param val comparison target%0A     * @return largest value.%0A     */%0A    public T max(final T val) %7B%0A        return Indolently.max(this.get(), val);%0A    %7D%0A%0A    /**%0A     * compute smallest value.%0A     *%0A     * @param that comparison target%0A     * @return smallest value.%0A     */%0A    public T min(final ValueReference%3C? extends T%3E that) %7B%0A        return Indolently.min(this.get(), that.get());%0A    %7D%0A%0A    /**%0A     * compute smallest value.%0A     *%0A     * @param val comparison target%0A     * @return smallest value.%0A     */%0A    public T min(final T val) %7B%0A        return Indolently.min(this.get(), val
 );%0A    %7D

add min/max to CmpRef