@@ -0,0 +1,1721 @@
+/*%0A    Java Libraries https://github.com/foilen/java-libraries%0A    Copyright (c) 2015-2020 Foilen (http://foilen.com)%0A%0A    The MIT License%0A    http://opensource.org/licenses/MIT%0A%0A */%0Apackage com.foilen.smalltools.tuple;%0A%0A/**%0A * To keep one object's instance that you can mutate. Useful when you need methods to change the reference of an object that is passed by parameters.%0A */%0Apublic class ObjectHolder%3CO%3E %7B%0A%0A    private O object;%0A%0A    public ObjectHolder() %7B%0A    %7D%0A%0A    public ObjectHolder(O object) %7B%0A        this.object = object;%0A    %7D%0A%0A    @SuppressWarnings(%22rawtypes%22)%0A    @Override%0A    public boolean equals(Object obj) %7B%0A        if (this == obj) %7B%0A            return true;%0A        %7D%0A        if (obj == null) %7B%0A            return false;%0A        %7D%0A        if (getClass() != obj.getClass()) %7B%0A            return false;%0A        %7D%0A        ObjectHolder other = (ObjectHolder) obj;%0A        if (object == null) %7B%0A            if (other.object != null) %7B%0A                return false;%0A            %7D%0A        %7D else if (!object.equals(other.object)) %7B%0A            return false;%0A        %7D%0A        return true;%0A    %7D%0A%0A    public O get() %7B%0A        return object;%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        final int prime = 31;%0A        int result = 1;%0A        result = prime * result + ((object == null) ? 0 : object.hashCode());%0A        return result;%0A    %7D%0A%0A    public ObjectHolder%3CO%3E set(O object) %7B%0A        this.object = object;%0A        return this;%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        StringBuilder builder = new StringBuilder();%0A        builder.append(%22ObjectHolder %5Bobject=%22);%0A        builder.append(object);%0A        builder.append(%22%5D%22);%0A        return builder.toString();%0A    %7D%0A%0A%7D%0A

Add an ObjectHolder