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

visualization_msgs.msg.dds.MarkerArray Maven / Gradle / Ivy

package visualization_msgs.msg.dds;

import us.ihmc.communication.packets.Packet;
import us.ihmc.euclid.interfaces.Settable;
import us.ihmc.euclid.interfaces.EpsilonComparable;
import java.util.function.Supplier;
import us.ihmc.pubsub.TopicDataType;

public class MarkerArray extends Packet implements Settable, EpsilonComparable
{
   public us.ihmc.idl.IDLSequence.Object  markers_;

   public MarkerArray()
   {
      markers_ = new us.ihmc.idl.IDLSequence.Object (100, new visualization_msgs.msg.dds.MarkerPubSubType());

   }

   public MarkerArray(MarkerArray other)
   {
      this();
      set(other);
   }

   public void set(MarkerArray other)
   {
      markers_.set(other.markers_);
   }


   public us.ihmc.idl.IDLSequence.Object  getMarkers()
   {
      return markers_;
   }


   public static Supplier getPubSubType()
   {
      return MarkerArrayPubSubType::new;
   }

   @Override
   public Supplier getPubSubTypePacket()
   {
      return MarkerArrayPubSubType::new;
   }

   @Override
   public boolean epsilonEquals(MarkerArray other, double epsilon)
   {
      if(other == null) return false;
      if(other == this) return true;

      if (this.markers_.size() != other.markers_.size()) { return false; }
      else
      {
         for (int i = 0; i < this.markers_.size(); i++)
         {  if (!this.markers_.get(i).epsilonEquals(other.markers_.get(i), epsilon)) return false; }
      }

      return true;
   }

   @Override
   public boolean equals(Object other)
   {
      if(other == null) return false;
      if(other == this) return true;
      if(!(other instanceof MarkerArray)) return false;

      MarkerArray otherMyClass = (MarkerArray) other;

      if (!this.markers_.equals(otherMyClass.markers_)) return false;

      return true;
   }

   @Override
   public java.lang.String toString()
   {
      StringBuilder builder = new StringBuilder();

      builder.append("MarkerArray {");
      builder.append("markers=");
      builder.append(this.markers_);
      builder.append("}");
      return builder.toString();
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy