Package jadex.rules.examples.fibonacci
Class FibonacciNumber
- java.lang.Object
-
- jadex.rules.examples.fibonacci.FibonacciNumber
-
public class FibonacciNumber extends java.lang.ObjectThe fibonacci number java representation.
-
-
Field Summary
Fields Modifier and Type Field Description protected PropertyChangeSupportpcsThe property change support.protected intsequenceThe sequence number.protected longvalueThe 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 voidaddPropertyChangeListener(PropertyChangeListener listener)Add a PropertyChangeListener to the listener list.intgetSequence()Get the sequence number.longgetValue()Get the value.voidremovePropertyChangeListener(PropertyChangeListener listener)Remove a PropertyChangeListener from the listener list.voidsetValue(long value)Set the value.java.lang.StringtoString()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:
toStringin 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.
-
-