Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tonbeller.tbutils.res
Class CompositeResourceProvider

    java.lang.Object
      com.tonbeller.tbutils.res.CompositeResourceProvider

All Implemented Interfaces:
  ResourceProvider

Direct Known Subclasses:
  SimpleInitialProvider

public class CompositeResourceProvider
extends java.lang.Object
implements ResourceProvider

Composite ResourceProvider. Contains an ordered list of `ResourceProvider`'s. For a given key it iterates the list and returns the value of the first ResourceProvider that knows about the key.

Constructor Summary
`CompositeResourceProvider()`

Method Summary
`void` | `add(int index, ResourceProvider r)`
`void` | `add(ResourceProvider r)`
`void` | `close()` frees resources
`void` | `dump(Dumper d)` for debugging / logging
`java.lang.String` | `getName()` for debugging / logging
`java.util.List` | `getProviders()`
`java.lang.String` | `getString(java.lang.String key)` returns null if key does not exist
`java.util.Collection` | `keySet()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CompositeResourceProvider

    public CompositeResourceProvider()

Method Detail

### getString

    public java.lang.String getString(java.lang.String key)

  Description copied from interface: `ResourceProvider`
  returns null if key does not exist

  Specified by:
    `getString` in interface `ResourceProvider`

### add

    public void add(ResourceProvider r)

### add

    public void add(int index,
                    ResourceProvider r)

### getProviders

    public java.util.List getProviders()

### keySet

    public java.util.Collection keySet()

  Specified by:
    `keySet` in interface `ResourceProvider`

### close

    public void close()

  Description copied from interface: `ResourceProvider`
  frees resources

  Specified by:
    `close` in interface `ResourceProvider`

### dump

    public void dump(Dumper d)

  Description copied from interface: `ResourceProvider`
  for debugging / logging

  Specified by:
    `dump` in interface `ResourceProvider`

### getName

    public java.lang.String getName()

  Description copied from interface: `ResourceProvider`
  for debugging / logging

  Specified by:
    `getName` in interface `ResourceProvider`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD