public class Profiles
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Profiles.NAMESPACES
The enumeration of valid namespaces.
|
Modifier and Type | Field and Description |
---|---|
private java.util.EnumMap<Profiles.NAMESPACES,Namespace> |
mProfileMap
An enum map that associates the enum keys with the corresponding
namespace objects.
|
Constructor and Description |
---|
Profiles()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addProfile(Profile p)
Adds a profile.
|
void |
addProfile(Profiles.NAMESPACES namespace,
java.lang.String key,
java.lang.String value)
Add a profile.
|
void |
addProfile(java.lang.String namespace,
java.lang.String key,
java.lang.String value)
Add a profile.
|
void |
addProfileDirectly(Profile p)
Adds a profile directly to namespace bypassing any underlying namespace
specific checks.
|
void |
addProfileDirectly(Profiles.NAMESPACES namespace,
java.lang.String key,
java.lang.String value)
Add a profile.
|
void |
addProfileDirectly(java.lang.String namespace,
java.lang.String key,
java.lang.String value)
Add a profile.
|
void |
addProfiles(java.util.List<Profile> profiles)
Adds multiple profiles.
|
void |
addProfiles(Profiles profiles)
Adds multiple profiles.
|
void |
addProfilesDirectly(java.util.List<Profile> profiles)
Adds multiple profiles to namespace bypassing any underlying namespace
specific checks.
|
void |
addProfilesDirectly(Profiles profiles)
Adds multiple profiles .
|
java.lang.Object |
clone()
Returns the clone of the object.
|
Namespace |
get(Profiles.NAMESPACES n)
Returns the namespace object corresponding to a namespace
|
private int |
getIndex(Profiles.NAMESPACES u)
Returns the index for the namespace.
|
java.util.Iterator |
getProfileKeyIterator(Profiles.NAMESPACES n)
Returns a iterator over the profile keys corresponding to a particular namespace.
|
java.util.List<Profile> |
getProfiles()
Returns the list of profiles for all namespaces.
|
java.util.List<Profile> |
getProfiles(Namespace namespace)
Returns the list of profiles corresponding to a single namespace
|
java.util.List<Profile> |
getProfiles(Profiles.NAMESPACES namespace)
Returns the list of profiles corresponding to a single namespace
|
java.util.List<Profile> |
getProfiles(java.lang.String namespace)
Returns the list of profiles corresponding to a single namespace
|
boolean |
isEmpty()
Returns a boolean indicating if the object is empty.
|
static void |
main(java.lang.String[] args) |
java.lang.String |
toString()
Returns the string description of the object.
|
void |
toString(java.io.Writer writer,
java.lang.String indent)
Writes out the contents of the object as a String
|
java.lang.String |
toXML()
Returns the xml description of the object.
|
void |
toXML(java.io.Writer writer,
java.lang.String indent)
Writes out the xml description of the object.
|
void |
writeAttribute(java.io.Writer writer,
java.lang.String key,
java.lang.String value)
Writes an attribute to the stream.
|
private java.util.EnumMap<Profiles.NAMESPACES,Namespace> mProfileMap
public void addProfiles(Profiles profiles)
profiles
- the profiles objectpublic void addProfiles(java.util.List<Profile> profiles)
profiles
- List of Profile
objects.public void addProfilesDirectly(Profiles profiles)
profiles
- the profiles objectpublic void addProfilesDirectly(java.util.List<Profile> profiles)
profiles
- List of Profile
objects.public void addProfileDirectly(Profile p)
p
- the profile to be addedpublic void addProfile(Profile p)
p
- the profile to be addedpublic void addProfileDirectly(Profiles.NAMESPACES namespace, java.lang.String key, java.lang.String value)
namespace
- key
- value
- public void addProfileDirectly(java.lang.String namespace, java.lang.String key, java.lang.String value)
namespace
- key
- value
- public void addProfile(Profiles.NAMESPACES namespace, java.lang.String key, java.lang.String value)
namespace
- key
- value
- public void addProfile(java.lang.String namespace, java.lang.String key, java.lang.String value)
namespace
- key
- value
- public java.util.List<Profile> getProfiles()
Profiles
public java.util.List<Profile> getProfiles(java.lang.String namespace)
namespace
- the namespaceProfiles
public java.util.List<Profile> getProfiles(Profiles.NAMESPACES namespace)
namespace
- the namespaceProfiles
public java.util.List<Profile> getProfiles(Namespace namespace)
namespace
- the namespaceProfiles
public java.util.Iterator getProfileKeyIterator(Profiles.NAMESPACES n)
n
- the namespacepublic Namespace get(Profiles.NAMESPACES n)
n
- the namespacepublic boolean isEmpty()
public void toXML(java.io.Writer writer, java.lang.String indent) throws java.io.IOException
writer
- is a Writer opened and ready for writing. This can also
be a StringWriter for efficient output.indent
- the indent to be used.java.io.IOException
- if something fishy happens to the stream.public java.lang.String toString()
toString
in class java.lang.Object
java.lang.RuntimeException
- if something fishy happens to the stream.public void toString(java.io.Writer writer, java.lang.String indent) throws java.io.IOException
writer
- is a Writer opened and ready for writing. This can also
be a StringWriter for efficient output.indent
- the indent to be used.java.io.IOException
- if something fishy happens to the stream.public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toXML() throws java.io.IOException
java.io.IOException
- if something fishy happens to the stream.public void writeAttribute(java.io.Writer writer, java.lang.String key, java.lang.String value) throws java.io.IOException
writer
- key
- value
- java.io.IOException
- if something fishy happens to the stream.private int getIndex(Profiles.NAMESPACES u)
u
- the unitpublic static void main(java.lang.String[] args)
args
-