package com.github.arteam.jdit.domain.entity;

import com.google.common.base.Objects;
import com.google.common.base.Optional;

/**
 * Date: 2/7/15
 * Time: 4:58 PM
 *
 * @author Artem Prigoda
 */
public class Team {

    public final Optional<Long> id;
    public final String name;
    public final Division division;

    public Team(Optional<Long> id, String name, Division division) {
        this.id = id;
        this.name = name;
        this.division = division;
    }

    public Team(String name, Division division) {
        this.name = name;
        this.division = division;
        this.id = Optional.absent();
    }

    @Override
    public String toString() {
        return Objects.toStringHelper(this)
                .add("id", id)
                .add("name", name)
                .add("division", division)
                .toString();
    }
}

@@ -70,16 +70,20 @@
 on.base.
+More
 Objects;
@@ -689,16 +689,20 @@
  return 
+More
 Objects.

Remove use of deprecated API