public class MetaContainer extends java.lang.Object implements java.lang.Iterable<Meta>, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected java.util.ArrayList<Meta> |
metaList
Underlying list of meta data.
|
Constructor and Description |
---|
MetaContainer()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addMeta(Meta meta)
Adds a new meta to the current meta data container.
|
void |
addMeta(java.lang.String name,
java.lang.String value)
Adds a new meta to the current meta data container.
|
void |
addMetas(Meta[] metas)
Adds a set of meta to the current meta data container.
|
void |
addMetas(MetaContainer metaContainer)
Merges a meta data container within the current meta data container.
|
void |
deleteMeta(java.lang.String name)
Delete all the Meta that match the given meta data name.
|
boolean |
equals(java.lang.Object obj)
Helper function to compare a meta data container with another object.
|
java.util.List<Meta> |
getList()
Gets a list of the current container meta data.
|
Meta |
getMeta(java.lang.String name)
Gets the first Meta object that matches the given meta data name.
|
java.util.Collection<Meta> |
getMetaValues(java.lang.String name)
Gets a collection of all the Meta objects that matches the given meta
data name.
|
int |
hashCode() |
java.util.Iterator<Meta> |
iterator()
Gets an iterator over the current container meta data.
|
int |
size() |
java.lang.String |
toString()
Simple meta data container serializer.
|
protected java.util.ArrayList<Meta> metaList
public void addMeta(java.lang.String name, java.lang.String value)
name
- the meta name.value
- the meta value.public void addMeta(Meta meta)
meta
- the metapublic void addMetas(Meta[] metas)
metas
- the set of metas to addpublic void addMetas(MetaContainer metaContainer)
metaContainer
- the meta data container to be used.public java.util.Iterator<Meta> iterator()
iterator
in interface java.lang.Iterable<Meta>
public java.util.List<Meta> getList()
public Meta getMeta(java.lang.String name)
name
- the meta data name to lookup for.null
if no meta is found.public java.util.Collection<Meta> getMetaValues(java.lang.String name)
name
- the meta data name for which to perform a lookup.public void deleteMeta(java.lang.String name)
name
- the meta data name to delete.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object with which the current meta data container should be
compared.true
if the compared object is also a meta data
container with the same content.public java.lang.String toString()
toString
in class java.lang.Object
public int size()
Copyright © 2021 Dassault Systèmes, All Rights Reserved.