Package ucar.nc2
Class AttributeContainerHelper
java.lang.Object
ucar.nc2.AttributeContainerHelper
- All Implemented Interfaces:
Iterable<Attribute>,AttributeContainer
Deprecated.
Use AttributeContainerMutable.
A mutable collection of Attributes.
- Since:
- 5/5/2015
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.AttributeContainerHelper(String name, List<Attribute> from) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Add all; replace old if has same name.addAttribute(String name, Number value) Deprecated.Add Attribute; name and value must not be null.addAttribute(String name, String value) Deprecated.Add Attribute; name and value must not be null.addAttribute(Attribute att) Deprecated.Add new or replace old if has same namestatic AttributeContainerfilter(AttributeContainer atts, String... remove) Deprecated.use AttributeContainer.filter().findAttribute(String name) Deprecated.Find an Attribute by exact match on name.doublefindAttributeDouble(String attName, double defaultValue) Deprecated.Find a Numeric Attribute by name (ignore case), return the double value of the Attribute.Deprecated.Find an Attribute by name, first doing an exact match, then ignoring case.intfindAttributeInteger(String attName, int defaultValue) Deprecated.Find a Numeric Attribute by name (ignore case), return the integer value of the Attribute.findAttributeString(String attName, String defaultValue) Deprecated.Find a String Attribute by name (ignore case), return the String value of the Attribute.Deprecated.Returns immutable list of attributes.getName()Deprecated.Get the (optional) name of the AttributeContainer.booleanisEmpty()Deprecated.True is there are no attributes in the container.booleanDeprecated.Remove an Attribute : uses the attribute hashCode to find it.booleanremoveAttribute(String attName) Deprecated.Remove an Attribute by name.booleanremoveAttributeIgnoreCase(String attName) Deprecated.Remove an Attribute by name, ignoring casevoidDeprecated.Replace an Attribute with a different name, same value.voidDeprecated.static voidshow(AttributeContainer atts, Indent indent, Formatter f) Deprecated.Deprecated.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ucar.nc2.AttributeContainer
findAttValueIgnoreCase, hasAttribute, hasAttributeIgnoreCase, iteratorMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
AttributeContainerHelper
Deprecated. -
AttributeContainerHelper
Deprecated.
-
-
Method Details
-
filter
Deprecated.use AttributeContainer.filter().Create a new AttributeContainer, removing any whose name starts with one in the given list.- Parameters:
atts- Start with this set of Attributes.remove- Remove any whose name starts with one of these.- Returns:
- new AttributeContainer with attributes removed.
-
show
Deprecated. -
getName
Deprecated.Description copied from interface:AttributeContainerGet the (optional) name of the AttributeContainer.- Specified by:
getNamein interfaceAttributeContainer
-
setImmutable
Deprecated. -
isEmpty
public boolean isEmpty()Deprecated.Description copied from interface:AttributeContainerTrue is there are no attributes in the container.- Specified by:
isEmptyin interfaceAttributeContainer
-
getAttributes
Deprecated.Description copied from interface:AttributeContainerReturns immutable list of attributes.- Specified by:
getAttributesin interfaceAttributeContainer
-
addAttribute
Deprecated.Description copied from interface:AttributeContainerAdd new or replace old if has same name- Specified by:
addAttributein interfaceAttributeContainer- Parameters:
att- add this Attribute- Returns:
- the added attribute
-
addAttribute
Deprecated.Add Attribute; name and value must not be null. -
addAttribute
Deprecated.Add Attribute; name and value must not be null. -
addAll
Deprecated.Add all; replace old if has same name.- Specified by:
addAllin interfaceAttributeContainer
-
findAttributeString
Deprecated.Description copied from interface:AttributeContainerFind a String Attribute by name (ignore case), return the String value of the Attribute.- Specified by:
findAttributeStringin interfaceAttributeContainer- Returns:
- the attribute value, or defaultValue if not found
-
findAttribute
Deprecated.Description copied from interface:AttributeContainerFind an Attribute by exact match on name.- Specified by:
findAttributein interfaceAttributeContainer
-
findAttributeIgnoreCase
Deprecated.Description copied from interface:AttributeContainerFind an Attribute by name, first doing an exact match, then ignoring case.- Specified by:
findAttributeIgnoreCasein interfaceAttributeContainer
-
findAttributeDouble
Deprecated.Description copied from interface:AttributeContainerFind a Numeric Attribute by name (ignore case), return the double value of the Attribute.- Specified by:
findAttributeDoublein interfaceAttributeContainer- Returns:
- the attribute value, or defaultValue if not found
-
findAttributeInteger
Deprecated.Description copied from interface:AttributeContainerFind a Numeric Attribute by name (ignore case), return the integer value of the Attribute.- Specified by:
findAttributeIntegerin interfaceAttributeContainer- Returns:
- the attribute value, or defaultValue if not found
-
remove
Deprecated.Remove an Attribute : uses the attribute hashCode to find it.- Specified by:
removein interfaceAttributeContainer- Parameters:
a- remove this attribute- Returns:
- true if was found and removed
-
replace
Deprecated.Replace an Attribute with a different name, same value.- Parameters:
a- remove this attribute
-
removeAttribute
Deprecated.Remove an Attribute by name.- Specified by:
removeAttributein interfaceAttributeContainer- Parameters:
attName- if exists, remove this attribute- Returns:
- true if was found and removed
-
removeAttributeIgnoreCase
Deprecated.Remove an Attribute by name, ignoring case- Specified by:
removeAttributeIgnoreCasein interfaceAttributeContainer- Parameters:
attName- if exists, remove this attribute- Returns:
- true if was found and removed
-
toImmutable
Deprecated.
-