Package org.gephi.graph.api
Interface ColumnObserver
-
public interface ColumnObserver
Observer over a column to monitor changes in the attributes values.Column observer can be used to periodically monitor changes made to a column. This scenario is common is multi-threaded applications where a thread is responsible to take action when something has changed in the column's data.
Column observer users should periodically call the
hasColumnChanged()
method to check the status. Each call resets the observer so if the method returns true and the table doesn't change after that it will return false next time.This observer monitors all the rows for this column and consider something has changed when an element's value for this column has been changed.
Observers should be destroyed when not needed anymore. A new observer can be obtained from the
Column
.- See Also:
Column
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
destroy()
Destroys this observer.Column
getColumn()
Gets the column this observer belongs to.ColumnDiff
getDiff()
Gets the column difference.boolean
hasColumnChanged()
Returns true if the column has changed.boolean
isDestroyed()
Returns true if this observer has been destroyed.
-
-
-
Method Detail
-
hasColumnChanged
boolean hasColumnChanged()
Returns true if the column has changed.- Returns:
- true if changed, false otherwise
-
getDiff
ColumnDiff getDiff()
Gets the column difference.- Returns:
- the column diff
-
getColumn
Column getColumn()
Gets the column this observer belongs to.- Returns:
- the table
-
destroy
void destroy()
Destroys this observer.
-
isDestroyed
boolean isDestroyed()
Returns true if this observer has been destroyed.- Returns:
- true if destroyed, false otherwise
-
-