Package org.smooks.engine.profile
Class DefaultProfileSet
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<String,org.smooks.api.profile.Profile>
-
- org.smooks.engine.profile.DefaultProfileSet
-
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,org.smooks.api.profile.Profile>,org.smooks.api.profile.ProfileSet
public class DefaultProfileSet extends LinkedHashMap<String,org.smooks.api.profile.Profile> implements org.smooks.api.profile.ProfileSet
Default ProfileSet implementation.- Author:
- tfennelly
- See Also:
- Serialized Form
-
-
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 Constructor Description DefaultProfileSet(String baseProfile)Public constructor.DefaultProfileSet(String baseProfile, String[] subProfiles)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProfile(String profile)Add profile to the ProfileSet.voidaddProfile(org.smooks.api.profile.Profile profile)Add profile to the ProfileSet.voidaddProfiles(String[] subProfiles)Add a list of subProfiles to the ProfileSet.protected voidaddProfileSet(DefaultProfileSet profileSet)Add the profiles of the supplied DefaultProfileSet to this ProfileSet.StringgetBaseProfile()Get the base profile for this profile set.org.smooks.api.profile.ProfilegetProfile(String profile)Get a profile from theProfileSet.booleanisMember(String profile)Iterator<org.smooks.api.profile.Profile>iterator()StringtoString()-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
Methods inherited from class java.util.AbstractMap
equals, hashCode
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Method Detail
-
getBaseProfile
public String getBaseProfile()
Get the base profile for this profile set.- Specified by:
getBaseProfilein interfaceorg.smooks.api.profile.ProfileSet- Returns:
- Base profile name.
-
isMember
public boolean isMember(String profile)
- Specified by:
isMemberin interfaceorg.smooks.api.profile.ProfileSet
-
addProfile
public void addProfile(String profile)
Add profile to the ProfileSet.- Parameters:
profile- The profile to add.
-
addProfile
public void addProfile(org.smooks.api.profile.Profile profile)
Add profile to the ProfileSet.- Specified by:
addProfilein interfaceorg.smooks.api.profile.ProfileSet- Parameters:
profile- The profile to add.
-
getProfile
public org.smooks.api.profile.Profile getProfile(String profile)
Get a profile from theProfileSet.- Specified by:
getProfilein interfaceorg.smooks.api.profile.ProfileSet- Parameters:
profile- The name of the profile.- Returns:
- The requested Profile, or null if the profile is not a member of
the
ProfileSet.
-
iterator
public Iterator<org.smooks.api.profile.Profile> iterator()
- Specified by:
iteratorin interfaceorg.smooks.api.profile.ProfileSet- Returns:
- An
Iteratorthat allows iteration over theProfilesin thisProfileSet.
-
addProfileSet
protected void addProfileSet(DefaultProfileSet profileSet)
Add the profiles of the supplied DefaultProfileSet to this ProfileSet.- Parameters:
profileSet- The DefaultProfileSet whose profiles are to be added.
-
addProfiles
public void addProfiles(String[] subProfiles)
Add a list of subProfiles to the ProfileSet.- Parameters:
subProfiles- The array of sub Profiles to add.
-
toString
public String toString()
- Overrides:
toStringin classAbstractMap<String,org.smooks.api.profile.Profile>
-
-