Package org.bedework.calfacade.svc.prefs
Class CollectionPref<T extends Comparable<T>>
java.lang.Object
org.bedework.calfacade.base.DumpEntity<T>
org.bedework.calfacade.svc.prefs.CollectionPref<T>
- Type Parameters:
T- Type of element in the collection
- All Implemented Interfaces:
Serializable,org.bedework.util.logging.Logged
- Direct Known Subclasses:
CalendarPref,CategoryPref,ContactPref,LocationPref
Represent a set of user preferences from a Collection - e.g. preferred category.
- Version:
- 1.0
- Author:
- Mike Douglass douglm - rpi.edu
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bedework.calfacade.base.DumpEntity
DumpEntity.DumpType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanIf true automatically add preference to the preferred listprotected Collection<T>Users preferred collection. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd the element to the preferred collection.clone()booleanbooleaninthashCode()booleanRemove the element from the preferred collection.voidsetAutoAdd(boolean val) If true we automatically add preference to the preferred listvoidsetPreferred(Collection<T> val) toString()Methods inherited from class org.bedework.calfacade.base.DumpEntity
dump, dump, getLogger, hasDumpValueMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, trace, trace, trace, warn
-
Field Details
-
autoAdd
protected boolean autoAddIf true automatically add preference to the preferred list -
preferred
Users preferred collection.
-
-
Constructor Details
-
CollectionPref
public CollectionPref()
-
-
Method Details
-
setAutoAdd
public void setAutoAdd(boolean val) If true we automatically add preference to the preferred list- Parameters:
val- true for autoadd
-
getAutoAdd
public boolean getAutoAdd()- Returns:
- boolean true if we automatically add preference to the preferred list
-
setPreferred
- Parameters:
val- Collection of preferred entries
-
getPreferred
- Returns:
- Collection of preferred entries
-
add
Add the element to the preferred collection. Return true if it was added, false if it was in the list- Parameters:
val- Element to add- Returns:
- boolean true if added
-
remove
Remove the element from the preferred collection. Return true if it was removed, false if it was not in the list- Parameters:
val- Element to remove- Returns:
- boolean true if removed
-
equals
-
hashCode
public int hashCode() -
toString
-
clone
-