public class SimpleFileAttributes extends java.lang.Object implements IFileAttributes<java.lang.String,java.lang.String>, java.lang.Cloneable
IFileAttributes storing keys and values as
keys.
Copyright (C) Micro Focus
| Constructor and Description |
|---|
SimpleFileAttributes()
Basic constructor for an empty file attribute set.
|
SimpleFileAttributes(IFileAttributes<java.lang.String,java.lang.String> pAttributes)
Constructor for a new file attributes copying all attributes from another
set.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
getAllAttributes()
Returns all attributes and its values.
|
java.lang.String |
getAttribute(java.lang.String pKey)
Returns the value for an attribute with the given name.
|
static java.lang.String |
nullToUnknown(java.lang.String pValue)
Returns
if the given string is
null. |
void |
setAttribute(java.lang.String pName,
java.lang.String pValue)
Adds a new file attribute.
|
void |
setAttributeNullToUnknown(java.lang.String pName,
java.lang.String pValue)
Calls
setAttribute(String, String) but converts any given
null attribute value to . |
public SimpleFileAttributes()
public SimpleFileAttributes(IFileAttributes<java.lang.String,java.lang.String> pAttributes)
pAttributes - file attributes to copy attributes frompublic java.lang.String getAttribute(java.lang.String pKey)
IFileAttributesgetAttribute in interface IFileAttributes<java.lang.String,java.lang.String>pKey - the name of a file attributenullpublic void setAttribute(java.lang.String pName,
java.lang.String pValue)
IFileAttributessetAttribute in interface IFileAttributes<java.lang.String,java.lang.String>pName - the name of the file attributepValue - the value to which the file attribute should be setpublic void setAttributeNullToUnknown(java.lang.String pName,
java.lang.String pValue)
setAttribute(String, String) but converts any given
null attribute value to .pName - the attribute namepValue - the attribute valuenullToUnknown(String)public java.util.Map<java.lang.String,java.lang.String> getAllAttributes()
IFileAttributesgetAllAttributes in interface IFileAttributes<java.lang.String,java.lang.String>public static java.lang.String nullToUnknown(java.lang.String pValue)
if the given string is
null. Useful for avoiding the string "null" when e.g.
presenting values of a file in the UI.pValue - a string value which can be null if
the string is null. Never returns null.Copyright © 2015 Micro Focus GmbH. All rights reserved.