Package ch.zhaw.tasklist.core
Class Wrapper<S extends Source>
- java.lang.Object
-
- ch.zhaw.tasklist.core.Wrapper<S>
-
- Type Parameters:
S
- a source class
- Direct Known Subclasses:
Appointment
,Note
,Project
,Quicklink
,Workspace
public abstract class Wrapper<S extends Source> extends java.lang.Object
A Wrapper around aSource
. The wrapper wraps the source's fields withProperty
to enable listening for property changes. This is used to synchronize Changes to FileSystem and vice versa.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
Check objectjavafx.beans.property.StringProperty
getName()
Get Wrapper forSource.name
property.S
getSource()
Get the unwrapped original source value.int
hashCode()
Return hashcode if source is set
-
-
-
Constructor Detail
-
Wrapper
public Wrapper(S source)
Create wrapper- Parameters:
source
-
-
-
Method Detail
-
getSource
public S getSource()
Get the unwrapped original source value.- Returns:
- the source value
-
getName
public javafx.beans.property.StringProperty getName()
Get Wrapper forSource.name
property.- Returns:
- the wrapper
-
hashCode
public int hashCode()
Return hashcode if source is set- Overrides:
hashCode
in classjava.lang.Object
- Returns:
-
equals
public boolean equals(java.lang.Object obj)
Check object- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
-- Returns:
-
-