org.milyn.device.profile
Class DefaultProfileSet
java.lang.Object
java.util.AbstractCollection
java.util.AbstractSet
java.util.HashSet
java.util.LinkedHashSet
org.milyn.device.profile.DefaultProfileSet
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Collection, ProfileSet, java.io.Serializable, java.util.Set
- public class DefaultProfileSet
- extends java.util.LinkedHashSet
- implements ProfileSet
Default ProfileSet implementation.
- Author:
- tfennelly
- See Also:
- Serialized Form
Method Summary |
boolean |
add(java.lang.Object o)
|
void |
addProfile(java.lang.String profile)
Add profile to the ProfileSet. |
protected void |
addProfileSet(DefaultProfileSet profileSet)
Add the profiles of the supplied DefaultProfileSet to this ProfileSet. |
protected java.lang.String |
getProfile(int index)
Get the profile at the specified index. |
boolean |
isMember(java.lang.String profile)
Is the associated device a member of the specified profile. |
boolean |
remove(java.lang.Object o)
|
java.lang.String |
toString()
|
Methods inherited from class java.util.HashSet |
clear, clone, contains, isEmpty, iterator, size |
Methods inherited from class java.util.AbstractSet |
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
addAll, containsAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, removeAll, retainAll, size, toArray, toArray |
DefaultProfileSet
public DefaultProfileSet()
isMember
public boolean isMember(java.lang.String profile)
- Description copied from interface:
ProfileSet
- Is the associated device a member of the specified profile.
Implementations must be case insensitive.
- Specified by:
isMember
in interface ProfileSet
- Parameters:
profile
- The profile to check against.
- Returns:
- True if the associated device a member of the specified
profile, otherwise false.
addProfile
public void addProfile(java.lang.String profile)
- Add profile to the ProfileSet.
- Parameters:
profile
- The profile to add.
add
public boolean add(java.lang.Object o)
- Specified by:
add
in interface java.util.Set
remove
public boolean remove(java.lang.Object o)
- Specified by:
remove
in interface java.util.Set
getProfile
protected java.lang.String getProfile(int index)
- Get the profile at the specified index.
- Parameters:
index
- Index of profile to be returned.
- Returns:
- Profile name to be returned.
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.
toString
public java.lang.String toString()