public class IlvClusterNumber extends IlvClusterId
Constructor and Description |
---|
IlvClusterNumber(IlvInputStream stream)
Reads an
IlvClusterNumber from an
IlvInputStream . |
IlvClusterNumber(int number)
Creates a new
IlvClusterNumber to identify a cluster
using an integer value. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compares the
IlvClusterNumber to the specified object. |
int |
getNumber()
Returns the number attribute of the cluster identifier.
|
int |
hashCode()
Returns a hash code for the
IlvClusterNumber . |
String |
toString()
Returns a string representation of the
IlvClusterNumber . |
void |
write(IlvOutputStream stream)
Writes the object to an
IlvOutputStream . |
public IlvClusterNumber(int number)
IlvClusterNumber
to identify a cluster
using an integer value.number
- The integer value to identify the cluster.public IlvClusterNumber(IlvInputStream stream) throws IlvReadFileException
IlvClusterNumber
from an
IlvInputStream
.stream
- The input stream.IlvReadFileException
- when an error occurs while reading.public int getNumber()
public int hashCode()
IlvClusterNumber
.hashCode
in class IlvClusterId
IlvClusterNumber
Object.hashCode()
public boolean equals(Object obj)
IlvClusterNumber
to the specified object.
The result is true
if and only if the argument is not
null
, and if the argument is an instance of
IlvClusterNumber
and the method getNumber()
called on it returns the same value as the number attribute of the
IlvClusterNumber
.equals
in class IlvClusterId
obj
- The object with which to compare the
IlvClusterNumber
true
if the cluster numbers are equal and
false
otherwise.public String toString()
IlvClusterNumber
.toString
in class IlvClusterId
public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.write
in interface IlvPersistentObject
write
in class IlvClusterId
stream
- The output stream.IOException
- thrown when an exception occurs during
the write operation for this object.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.