All Downloads are FREE. Search and download functionalities are using the official Maven repository.

us.ihmc.scs2.definition.yoChart.YoChartGroupConfigurationListDefinition Maven / Gradle / Ivy

package us.ihmc.scs2.definition.yoChart;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

@XmlRootElement(name = "YoChartGroupConfigurationList")
public class YoChartGroupConfigurationListDefinition
{
   private String name;
   private List chartGroupConfigurations;

   public YoChartGroupConfigurationListDefinition()
   {
   }

   @XmlAttribute
   public void setName(String name)
   {
      this.name = name;
   }

   @XmlElement
   public void setChartGroupConfigurations(List chartGroupConfigurations)
   {
      this.chartGroupConfigurations = chartGroupConfigurations;
   }

   public void addChartGroupConfiguration(YoChartGroupConfigurationDefinition chartGroupConfiguration)
   {
      if (chartGroupConfigurations == null)
         chartGroupConfigurations = new ArrayList<>();
      chartGroupConfigurations.add(chartGroupConfiguration);
   }

   public String getName()
   {
      return name;
   }

   public List getChartGroupConfigurations()
   {
      return chartGroupConfigurations;
   }

   @Override
   public boolean equals(Object object)
   {
      if (object == this)
      {
         return true;
      }
      else if (object instanceof YoChartGroupConfigurationListDefinition other)
      {
         if (!Objects.equals(name, other.name))
            return false;
         if (!Objects.equals(chartGroupConfigurations, other.chartGroupConfigurations))
            return false;
         return true;
      }
      else
      {
         return false;
      }
   }

   @Override
   public String toString()
   {
      return "YoChartGroupConfigurationListDefinition [name=" + name + ", chartGroupConfigurations=" + chartGroupConfigurations + "]";
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy