com.google.bitcoin.crypto
Class ChildNumber

java.lang.Object
  extended by com.google.bitcoin.crypto.ChildNumber

public class ChildNumber
extends Object

This is just a wrapper for the i (child number) as per BIP 32 with a boolean getter for the first bit and a getter for the actual 0-based child number. A List of these forms a path through a DeterministicHierarchy. This class is immutable.


Field Summary
static int PRIV_BIT
           
static ChildNumber ZERO
           
 
Constructor Summary
ChildNumber(int i)
           
ChildNumber(int childNumber, boolean isPrivate)
           
 
Method Summary
 boolean equals(Object o)
           
 int getChildNumber()
           
 int getI()
           
 int hashCode()
           
 boolean isPrivateDerivation()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PRIV_BIT

public static final int PRIV_BIT
See Also:
Constant Field Values

ZERO

public static final ChildNumber ZERO
Constructor Detail

ChildNumber

public ChildNumber(int childNumber,
                   boolean isPrivate)

ChildNumber

public ChildNumber(int i)
Method Detail

getI

public int getI()

isPrivateDerivation

public boolean isPrivateDerivation()

getChildNumber

public int getChildNumber()
Returns:
the child number without the private/public derivation bit set.

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2014. All rights reserved.