IceStorm.LinkInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of icestorm-compat Show documentation
Show all versions of icestorm-compat Show documentation
Publish-subscribe event distribution service
// **********************************************************************
//
// Copyright (c) 2003-2018 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
//
// Ice version 3.7.1
//
//
//
// Generated from file `IceStorm.ice'
//
// Warning: do not edit this file.
//
//
//
package IceStorm;
/**
* Information on the topic links.
*
**/
public class LinkInfo implements java.lang.Cloneable,
java.io.Serializable
{
/**
* The linked topic.
*
**/
public TopicPrx theTopic;
/**
* The name of the linked topic.
*
**/
public String name;
/**
* The cost of traversing this link.
*
**/
public int cost;
public LinkInfo()
{
this.name = "";
}
public LinkInfo(TopicPrx theTopic, String name, int cost)
{
this.theTopic = theTopic;
this.name = name;
this.cost = cost;
}
public boolean
equals(java.lang.Object rhs)
{
if(this == rhs)
{
return true;
}
LinkInfo r = null;
if(rhs instanceof LinkInfo)
{
r = (LinkInfo)rhs;
}
if(r != null)
{
if(this.theTopic != r.theTopic)
{
if(this.theTopic == null || r.theTopic == null || !this.theTopic.equals(r.theTopic))
{
return false;
}
}
if(this.name != r.name)
{
if(this.name == null || r.name == null || !this.name.equals(r.name))
{
return false;
}
}
if(this.cost != r.cost)
{
return false;
}
return true;
}
return false;
}
public int
hashCode()
{
int h_ = 5381;
h_ = IceInternal.HashUtil.hashAdd(h_, "::IceStorm::LinkInfo");
h_ = IceInternal.HashUtil.hashAdd(h_, theTopic);
h_ = IceInternal.HashUtil.hashAdd(h_, name);
h_ = IceInternal.HashUtil.hashAdd(h_, cost);
return h_;
}
public LinkInfo
clone()
{
LinkInfo c = null;
try
{
c = (LinkInfo)super.clone();
}
catch(CloneNotSupportedException ex)
{
assert false; // impossible
}
return c;
}
public void
ice_writeMembers(Ice.OutputStream ostr)
{
TopicPrxHelper.write(ostr, this.theTopic);
ostr.writeString(this.name);
ostr.writeInt(this.cost);
}
public void
ice_readMembers(Ice.InputStream istr)
{
this.theTopic = TopicPrxHelper.read(istr);
this.name = istr.readString();
this.cost = istr.readInt();
}
static public void
ice_write(Ice.OutputStream ostr, LinkInfo v)
{
if(v == null)
{
_nullMarshalValue.ice_writeMembers(ostr);
}
else
{
v.ice_writeMembers(ostr);
}
}
static public LinkInfo
ice_read(Ice.InputStream istr)
{
LinkInfo v = new LinkInfo();
v.ice_readMembers(istr);
return v;
}
private static final LinkInfo _nullMarshalValue = new LinkInfo();
public static final long serialVersionUID = 6588693627892179214L;
}