Package jadex.rules.examples.fibonacci
Class FibonacciNumber
- java.lang.Object
-
- jadex.rules.examples.fibonacci.FibonacciNumber
-
public class FibonacciNumber extends java.lang.Object
The fibonacci number java representation.
-
-
Field Summary
Fields Modifier and Type Field Description protected PropertyChangeSupport
pcs
The property change support.protected int
sequence
The sequence number.protected long
value
The value.
-
Constructor Summary
Constructors Constructor Description FibonacciNumber(int sequence)
Create a new FibonacciNumber.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.int
getSequence()
Get the sequence number.long
getValue()
Get the value.void
removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.void
setValue(long value)
Set the value.java.lang.String
toString()
Get the string representation.
-
-
-
Field Detail
-
sequence
protected int sequence
The sequence number.
-
value
protected long value
The value.
-
pcs
protected PropertyChangeSupport pcs
The property change support.
-
-
Method Detail
-
getSequence
public int getSequence()
Get the sequence number.- Returns:
- The sequence number.
-
setValue
public void setValue(long value)
Set the value.- Parameters:
value
- The value.
-
getValue
public long getValue()
Get the value.- Returns:
- The value.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.- Parameters:
listener
- The PropertyChangeListener to be added.
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.- Parameters:
listener
- The PropertyChangeListener to be removed.
-
-