com.chaosserver.bilbo.data
Class FilenameMapping

java.lang.Object
  |
  +--com.chaosserver.bilbo.data.FilenameMapping

public class FilenameMapping
extends Object

Holds a filename mapping.for a single file.

A mapping is just what a seems.

Since:
Bilbo 1.0

Field Summary
protected  Collection names
          Holds the collections of names for the FilenameMapping.
 
Constructor Summary
FilenameMapping()
          Default constructor.
 
Method Summary
 void addName(Name name)
          Adds a new name to the mapping.
 Name findName(String style)
          Finds the name mapping based on the style.
 Name findName(String style, String value)
          Finds the name mapping for the given style, with the given value.
 Collection getNames()
          Getter for the names property.
 void setNames(Collection names)
          Setter for the names property.
 String toString()
          Generates a string version for debugging.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

names

protected Collection names
Holds the collections of names for the FilenameMapping.

Constructor Detail

FilenameMapping

public FilenameMapping()
Default constructor.

Method Detail

setNames

public void setNames(Collection names)
Setter for the names property.

Parameters:
names - the value of names

getNames

public Collection getNames()
Getter for the names property.

Returns:
the value of names

addName

public void addName(Name name)
Adds a new name to the mapping.

Parameters:
name - the name to add

findName

public Name findName(String style)
              throws NameNotFoundException
Finds the name mapping based on the style.

Parameters:
style - the style to return
Throws:
NameNotFoundException - if there is no mapping for the given style

findName

public Name findName(String style,
                     String value)
              throws NameNotFoundException
Finds the name mapping for the given style, with the given value.

Parameters:
style - the style to find
value - the value the name should have
Throws:
NameNotFoundException - if the name does not exist

toString

public String toString()
Generates a string version for debugging.

Overrides:
toString in class Object
Returns:
a string version


Copyright © 20020228