jfun.jaskell.ast
Class Binding

java.lang.Object
  extended byjfun.jaskell.ast.Binding
All Implemented Interfaces:
java.io.Serializable

public final class Binding
extends java.lang.Object
implements java.io.Serializable

Represents a unique identifier of a jaskell variable name.

Author:
Ben Yu Dec 30, 2004
See Also:
Serialized Form

Method Summary
 int getId()
          Get the id number of this binding.
 int getIndex()
          get the starting index in the original source.
 java.lang.String getName()
          get the name of this binding.
 int hashCode()
           
static Binding newBinding(int from, java.lang.String name)
          Create a new Binding object with a unique id.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getIndex

public int getIndex()
get the starting index in the original source.


toString

public java.lang.String toString()

getId

public int getId()
Get the id number of this binding.

Returns:
Returns the id.

getName

public java.lang.String getName()
get the name of this binding.

Returns:
Returns the name.

newBinding

public static Binding newBinding(int from,
                                 java.lang.String name)
Create a new Binding object with a unique id.

Parameters:
from - the index in the original source.
name - the name of this Binding object.
Returns:
the new Binding object.

hashCode

public int hashCode()