Class ColorMap
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,List<ClientCollectionInfo>>
If the filter is null then a match on the path is sufficient. Otherwise an event must be passed through the filter to see if it matches.
We need this as queries to the server are an optimised and combined form of the paths and filters represented by aliases and real collections. The result is that without effectively replaying the defined filters any given event can be uassignable to a path and thence a color.
This is especially true of public events in the single calendar model where all events come from a single path and some categories are common to many of the virtual paths, e.g. Arts
Each entry is indexed by the path. If there is only one ClientCollectionInfo in the result then that color is applied. If there is more than one then the event must be matched to the filter.
- Author:
- Mike Douglass
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidput(String path, ClientCollectionInfo cci) Either put a new entry or add to an existing path entry.voidsetColor(Collection<EventInfo> eis, String userHref) Attempt to set the color for the given events.voidAttempt to set the color for the given event.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
ColorMap
public ColorMap()
-
-
Method Details
-
put
Either put a new entry or add to an existing path entry.- Parameters:
path-cci-
-
setColor
Attempt to set the color for the given event. If there is no appropriate mapping the event color will be set to null.- Parameters:
ei-userHref-
-
setColor
Attempt to set the color for the given events. If there is no appropriate mapping the event color will be set to null.- Parameters:
eis-userHref-
-