Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.1.0

E18814-01


com.tangosol.io.pof.reflect
Class SimplePofPath

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.io.pof.reflect.AbstractPofPath
          extended by com.tangosol.io.pof.reflect.SimplePofPath

All Implemented Interfaces:
PortableObject, PofNavigator

public class SimplePofPath
extends AbstractPofPath

A static PofNavigator implementation which uses an array of integer indices to navigate the PofValue hierarchy.

Since:
Coherence 3.5
Author:
as 2009.02.14

Constructor Summary
SimplePofPath()
          Default constructor (necessary for the PortableObject interface).
SimplePofPath(int nIndex)
          Construct a SimplePofPath using a single index as a path.
SimplePofPath(int[] anIndices)
          Construct a SimplePofPath using an array of indices as a path.

 

Method Summary
 boolean equals(java.lang.Object o)
          Compare the SimplePofPath with another object to determine equality.
protected  int[] getPathElements()
          Return a collection of path elements.
 int hashCode()
          Determine a hash value for the SimplePofPath object according to the general Object.hashCode() contract.
 void readExternal(PofReader in)
          Restore the contents of a user type instance by reading its state using the specified PofReader object.
 java.lang.String toString()
          Return a human-readable description for this SimplePofPath.
 void writeExternal(PofWriter out)
          Save the contents of a POF user type instance by writing its state using the specified PofWriter object.

 

Methods inherited from class com.tangosol.io.pof.reflect.AbstractPofPath
navigate

 

Constructor Detail

SimplePofPath

public SimplePofPath()
Default constructor (necessary for the PortableObject interface).

SimplePofPath

public SimplePofPath(int nIndex)
Construct a SimplePofPath using a single index as a path.
Parameters:
nIndex - an index

SimplePofPath

public SimplePofPath(int[] anIndices)
Construct a SimplePofPath using an array of indices as a path.
Parameters:
anIndices - an array of indices

Method Detail

getPathElements

protected int[] getPathElements()
Return a collection of path elements.
Specified by:
getPathElements in class AbstractPofPath
Returns:
a collection of path elements

equals

public boolean equals(java.lang.Object o)
Compare the SimplePofPath with another object to determine equality. Two SimplePofPath objects are considered equal iff their indices are equal.
Returns:
true iff this SimplePofPath and the passed object are equivalent

hashCode

public int hashCode()
Determine a hash value for the SimplePofPath object according to the general Object.hashCode() contract.
Returns:
an integer hash value for this SimplePofPath object

toString

public java.lang.String toString()
Return a human-readable description for this SimplePofPath.
Returns:
a String description of the SimplePofPath

readExternal

public void readExternal(PofReader in)
                  throws java.io.IOException
Restore the contents of a user type instance by reading its state using the specified PofReader object.
Parameters:
in - the PofReader from which to read the object's state
Throws:
java.io.IOException - if an I/O error occurs

writeExternal

public void writeExternal(PofWriter out)
                   throws java.io.IOException
Save the contents of a POF user type instance by writing its state using the specified PofWriter object.
Parameters:
out - the PofWriter to which to write the object's state
Throws:
java.io.IOException - if an I/O error occurs

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.1.0

E18814-01


Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.