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.ObjectA Wrapper around aSource. The wrapper wraps the source's fields withPropertyto 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 booleanequals(java.lang.Object obj)Check objectjavafx.beans.property.StringPropertygetName()Get Wrapper forSource.nameproperty.SgetSource()Get the unwrapped original source value.inthashCode()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.nameproperty.- Returns:
- the wrapper
-
hashCode
public int hashCode()
Return hashcode if source is set- Overrides:
hashCodein classjava.lang.Object- Returns:
-
equals
public boolean equals(java.lang.Object obj)
Check object- Overrides:
equalsin classjava.lang.Object- Parameters:
obj-- Returns:
-
-