Top Description Fields Constructors Methods
java_cup

public abstract Class production_part

extends Object
Class Inheritance
Known Direct Subclasses
java_cup.symbol_part, java_cup.action_part

This class represents one part (either a symbol or an action) of a production. In this base class it contains only an optional label string that the user can use to refer to the part within actions.

This is an abstract class.

Author
Scott Hudson
Version
last updated: 11/25/95
See Also
java_cup.production

Field Summary

Modifier and TypeField and Description
protected String
_label

Optional label for referring to the part within an action (null for no label).

Constructor Summary

AccessConstructor and Description
public
production_part(String lab)

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(production_part other)

Equality comparison.

public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

Generic equality comparison.
public int
hashCode()

Overrides java.lang.Object.hashCode.

Produce a hash code.
public abstract boolean
is_action()

Indicate if this is an action (rather than a symbol).

public String
label()

Optional label for referring to the part within an action (null for no label).

public String
toString()

Overrides java.lang.Object.toString.

Convert to a string.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

_labelback to summary
protected String _label

Optional label for referring to the part within an action (null for no label).

Constructor Detail

production_partback to summary
public production_part(String lab)

Simple constructor.

Method Detail

equalsback to summary
public boolean equals(production_part other)

Equality comparison.

equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

Generic equality comparison.

Parameters
other:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Produce a hash code.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object.

is_actionback to summary
public abstract boolean is_action()

Indicate if this is an action (rather than a symbol). Here in the base class, we don't this know yet, so its an abstract method.

labelback to summary
public String label()

Optional label for referring to the part within an action (null for no label).

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Convert to a string.

Returns:String

Doc from java.lang.Object.toString.

a string representation of the object.