util
Interface PropertyBearing

All Known Subinterfaces:
AfterRegistering, CommandLaunching, CommandRendering, DatabaseParameter, ErrorDependingParameter, ErrorFinalizing, ErrorHandling, ExposureTimeMeasuring, Logging, OffsetCaster, Parameter, ParameterClustering, Scheduling, Sequencing<E>, SocketParameter, StatePreserving, StatusRequesting, Switch, TargetDependingParameter, TargetDependingValue, Telemetering, Trigger, Value, WeatherDependingParameter, WeatherSurveying
All Known Implementing Classes:
AbstractAltAzGuider, AbstractAnalyser, AbstractCachedParameter, AbstractCcdDriver, AbstractCCDParameter, AbstractCCDValue, AbstractCommandLauncher, AbstractCommandRenderer, AbstractConversion, AbstractDatabaseParameter, AbstractDatabaseValue, AbstractDataCollector, AbstractDataSink, AbstractDerivative, AbstractDisplayable, AbstractDriver, AbstractErrorFinalizer, AbstractErrorHandler, AbstractFit, AbstractFitsMomentsValue, AbstractFitsParameter, AbstractFitsValue, AbstractLogger, AbstractMerit, AbstractNasmythGuider, AbstractParameter, AbstractParameterCluster, AbstractPhaseMerit, AbstractPilarDriver, AbstractPinholeModel, AbstractPinholeShift, AbstractRemoteParameter, AbstractRemoteSwitch, AbstractRemoteTrigger, AbstractRemoteValue, AbstractRmiCaster, AbstractRmiCasterAndListener, AbstractRmiDataSink, AbstractRmiListener, AbstractScheduler, AbstractSensor, AbstractSequencer, AbstractSerialDriver, AbstractShelter, AbstractSocketDriver, AbstractSql, AbstractStarGuider, AbstractStatusRequestor, AbstractSwitch, AbstractTarget, AbstractTargetParameter, AbstractTargetProvider, AbstractTargetValue, AbstractTransferProxy, AbstractTrigger, AbstractValue, AbstractWeatherSurveyor, AcceleratedJd, AcceleratedTime, AcquireStarParser, AcquiringUnit, AdapterCaster, AdapterGuider, AdapterMaster, AdapterSimulator, AdapterTelescopeCaster, AdapterUnit, AfterPickMerit, AirmassMerit, AirmassTarget, AlarmWatch, Altitude, AltTarget, AltTelescope, AltVelocity, AmplifierCrosstalk, Annulus, ApplicationJoiner, AsciiCatalog, AssistantScheduler, AstroKernel, AsynchronousCcdDriver, AtTimeMerit, AuxiliaryCaptureUnit, AuxiliaryCaster, AuxiliaryCoarseUnit, AuxiliaryFineUnit, AuxiliaryGuider, AuxiliaryGuidingUnit, AuxiliaryMaster, AuxiliaryPinholeUnit, AuxiliaryPointing, AuxiliaryUnit, AveragePinhole, AverageSensor, AvoidanceMerit, AzTarget, AzTelescope, AzVelocity, BaaderDome, BadSensor, BarycentricVelocity, BeamSplitterGuider, BeforeAfterMerit, BiasMaster, Blinker, BlockMerit, BVTarget, CabinetSwitch, CalibrationCaster, CalibrationMaster, CalibrationSimulator, CalibUnit, Calima, CasterClient, CasterTorso, CastingContainer, CastingRS485Server, CCDCaster, CCDLn2Temp, CCDRefTemp, CCDTemp, CenterOfGravityShift, CentralProjection, CleanFourier, CommandReceiver, ConsecutiveMerit, ConstantMerit, ConstantOffset, CosineConversion, CountDownTrigger, CountDownWatch, CountingTrigger, CrosstalkDark, CumulativeSensor, DailyDump, DailyDumpRepository, DarkMaster, DarkOverlapTiler, DarkSkyMerit, DarkTiler, DatabaseCurrent, DatabaseNow, DataSensor, DataValue, DateFromJd, DateParser, DawnMerit, DecApparent, DecTarget, DerivativeSensor, DerotatorCenter, DerotatorOffset, DeviceSimulator, DeviceTrigger, DewPoint, DewPointConvert, DigitizedSkySurveyImage, Distance, Distance.TargetDistance, DistinctCaster, DitherParameter, DiurnalVelocity, DomeMaster, DomeReceiver, DomeSimulator, Donut, DummyRS485, DummySequencer, E2VDriver, E2VGeometry, E2VGuider, EclipticObliquity, Efficiency, ElapsedTime, ElementHelper, EnvironmentCaster, EnvironmentFocus, EnvironmentMaster, EnvironmentSimulator, ErrorEcho, ErrorReceiver, ErrorRelay, ErrorServer, ErrorTrigger, EvenlySpacedMerit, ExposureCount, ExposureRepeat, ExposureSpan, ExposureTime, ExposureTimeLeft, ExpressionCalculator, ExpressionFit, ExpressionMerit, ExtinctionCoefficient, FakeSensor, FakeSolZSensor, FechnerDriver, FieldSerializer, FileCurrent, FileDump, FilterTarget, FilterWavelength, FilterWheel, FilterWheelPosition, FilterWidth, FireDriver, FireDriverWish, FirstOffsetParser, FitsCheck, FitsConvert, FitsMoments, FitsParameterStub, FitsRelay, FitsUpdateListener, FixedDelayMerit, FixedRateMerit, FlatCheck, FlatExposureTime, FlatFinder, FlatGroup, FlatMaster, FlatMatch, FlatMaximumTime, FlatPointing, FlatQuality, FluxAdapter, FocusMeasure, FocusPosition, FocusQuality, FocussingMoments, FocussingUnit, FocusSpindleFit, FocusStar, FollowingProgramMerit, ForcedSwitchOnMerit, ForcedTimeoutMerit, Fourier, FractionalExposureTime, FrameProvider, FwhmAdapter, GenericMaster, GenericMaster.Standalone, GenericSimulator, GenericSql, GenericStarDatabase, GoodPrimeFocusParser, GoodWeatherFinalizer, GrbTarget, GuiderData, GuiderMode, GuiderParameters, GuiderParametersAltAz, GuiderParametersRaDe, GuidingStatistic, GuidingUnit, HarmonicFit, HeaderUpdate, HeadPressure, HealthSensor, HighestTarget, HipparchosDatabase, HistorySql, HjdCorrection, Horizon, HostAddress, HumiditySwitch, Icat, IcatFinalize, IcatJoin, IcatMaster, IcatPrepare, IcatSearch, IdenticalConversion, ImageAmoeba, ImageCache, ImageRevolution, ImageRotation, ImageType, InferPark, IntegerId, JAbstractAnalyser, JAllsky, JanosDriver, JAsynchronAnalyser, JBaycam, Jd, JDataModelDisplay, JDataSink, JDaycam, JdModulusMerit, JEditableAnalyser, JElementDisplay, JElementEdit, JElementHelper, JFrameParameter, JFtpWebcam, JGuiderPanel, JImageURLButton.ImageListener, JInfoPanel, JLaunchBox, JLogField, JMessageListener, JObjectDisplay.SubComponentHandler, JObjectHelper, JOffLimit, JOffLimit.Monitor, JOffLimit.Server, JOffTails, JOffTails.Server, JPhasePlot, JPointingGrabber, JRoofView, JRoofView.Link, JRS485Config, JRS485Simulator, JSensorTable, JSliderParameter, JSpectrumCanvas, JSplittedDataDisplay, JStatisticAnalyser, JStatusExit, JStatusField, JStatusPanel, JStatusSave, JSwitcherStub, JTargetHelper, JTargetTable, JTargetTableManager, JTargetTableRanker, JTelescopeStatusPanel, JTypeHelper, JVisualizingAnalyser, JWebcam, JWheel.DummyAxes, KeystrokeSensor, Latitude, LeastFourier, LightCurveSimulator, LightSwitch, LimitedPolynomialConversion, LinearPositioner, LinearPrimeFocus, LoggerTest, LogParser, LombPeriodogram, Longitude, LoopingSequencer, LostGuidingFinalizer, MagellanDriver, MagellanDriver, Mailer, MailFinalizer, MasterErrorHandler, MasterErrorHandler.NoneErrorFinalizer, MasterLauncher, MasterListener, MasterMind, MeridianMerit, MessageListener, MiddayMerit, MidnightMerit, MinimumStringLength, MiniWheel, MirrorCenter, MirrorFocus, MirrorTemperature, MissmatchTrigger, ModelDrift, ModelShift, MomentsFocusser, MomentsTrigger, Moon, MoonAngle, MoonAvoidanceMerit, MoonAzimuth, MoonDec, MoonHeight, MoonLight, MoonPhase, MoonRa, MotorController, MoxaSensor, MultipleFrequencyFit, MyRmiListener, NasmithImageRevolution, NasmithImageRotation, NasmythGuider, NasmythUnit, NightClear, NightLength, NightlyMerit, NightlyStatistic, NightRemain, NightStretchMerit, NoiseSolZSensor, NudamConfig, NumberMerit, ObjectHelper, ObservableList, ObserveSql, Observing, OffLimitAlarm, OffLimitMailer, OffLimitVisual, OneObservationMerit, OneReadTrigger, OneWireADSensor, OneWireMultiSwitch, OneWireRainSensor, OneWireSensor, OneWireSwitch, OpenPilarSocket, OpenPilarSocket.PilarTest, OppositionMerit, OrbitFit, Overscan, ParameterRelay, ParameterSensor, ParameterServer, ParameterSet, ParameterSkeleton, ParameterStub, ParsedTarget, PatternMerit, PermissionSql, PerNightMerit, PhaseAvoidanceMerit, PhaseCoherentMerit, PhaseDispersionMinimization, PhaseFillerMerit, PhaseMerit, PhaseRegression, PickRaiseMerit, PIDControl, Pilar3Socket, Pilar3Socket.PilarTest, PilarLauncher, PilarParameter, PilarTelescopeCaster, PilarTrigger, PilarValue, PointingGrabber, PointingModel, PointingScheduler, PollingRS485Server, PolynomialConversion, PowerTelescope, PredictiveSensor, PrepareDark, PrimeFocusCamera, PrimeFocusGuider, PriorityMerit, PropDecTarget, PropertyContainer, PropertySyslog, ProposalSql, PropRaTarget, PyramidUnit, PythonClient, QuadrantShift, QuickDumpSensor, RaApparent, RandomMerit, RandomOffsetParser, RankProvider, RaTarget, ReadoutRepository, ReceiverServer, ReceiverTorso, ReductionMaster, RefractionModel, RegainedGuidingFinalizer, RelativeWheel, RemoteSensorAverage, RemoteSensorMaximum, RemoteSensorShelf, RemoteSensorStatistic, RemoteSensorStub, RemoteShelfAverage, RemoteShelfMaximum, RepetitiveMerit, ResendCommandFinalizer, ResetFinalizer, RMagTarget, RmiPropertyContainer, RobotChoreography, RollOverWatch, RoofReceiver, RoofTrigger, RS485Configurator, RS485RainSensor, RS485ReadWriteServer, RS485Scan, RS485Sensor, RS485Server, RS485Switch, ScienceAcquire, ScienceCcdDriver, SeasonWeather, SensorRepository, SensorShelf, SensorSql, SensorStatistic, SensorTest, SensorValue, SequenceErrorFinalizer, SerialDriver, SerialValue, ServerClient, ServerPort, SesMaster, SesSimulator, SettableTime, SextractorRead, SextractorRegions, ShapeListener, ShapePrincipal, ShapeStatistic, ShelfStatistic, ShelfStatistic.Average, ShelfStatistic.Maximum, ShelfStatistic.Minimum, ShelfStatistic.Test, ShelterMaster, ShelterTrigger, ShutterTimes, SiderealGreenwich, SiderealGreenwichApparent, SiderealTime, SightInfo, SignalToNoise, Simbad, SimpleEventTrigger, SimpleParameter, SimpleRemoteSwitch, SimpleRemoteTrigger, SimpleRemoteValue, SimpleTrigger, SimpleValue, SimpleValue.Exposure, SimulateFits, SimulatorSequencer, SimulatorWeather, SlewTimeMerit, SmoothingSensor, SnapshotParameter, SnapshotValue, SolAzimuth, SolDec, SolDistance, SolHeight, SolHeightSensor, SolLambda, SolOpposition, SolRa, SolSink, SolZ, SolZSensor, SpectrographCaster, SpillageGuider, StarAmoeba, StarCatalog, StaticSql, StatisticAnalyser, Statistics, StatisticValue, StatisticValue.Average, StatisticValue.Maximum, StatisticValue.Median, StatisticValue.Minimum, StatusSerializer, StellaGuider, StopWatch, StreamingCcdDriver, SubComponentNotify, SubTargets, SuccessorCloseMerit, SuccessorMerit, SumWatch, SunAvoidanceMerit, SwitchSkeleton, SwitchStub, SwitchTrigger, SynchronousCcdDriver, TargetCatalogName, TargetChangeListener, TargetConsistency, TargetDatabase, TargetDistance, TargetFilterFunction, TargetFunction, TargetHelper, TargetInstitution, TargetList, TargetMerit, TargetName, TargetReport, TargetSetup, TargetSql, TargetType, TargetUser, TaskSql, TauTarget, TelescopeAuxiliaryCaster, TelescopeAxis, TelescopeCaster, TelescopeClient, TelescopeError, TelescopeHelper, TelescopeMaster, TelescopeSimulator, TerminalMerit, TestCaster, TestCaster, TestReceiver, TestReceiver, Time, TimerTaskSensor, TrackTime, TrackVelocity, TransferListener, TransferX, TriggerSkeleton, TriggerStub, Twilight, TypeHelper, Ucac2Database, Unique, Ups, UpsDriver, UpsSensor, UserDrivenFitting, UserMerit, UserProperty, UserShare, UserSql, ValueDifference, ValueFraction, ValueProduct, ValueStub, ValueSum, VideoGuider, VizierStar, VMagTarget, WakeFinalizer, Waltz, WatchController, WatchdogRS485Server, WcsFit, WcsMatch, WcsProjection, WcsProjection.EulerRotation, WcsProjection.Gnomonic, WcsProjection.LinearGnomonicRaDe, WcsProjection.LinearPixelProjection, WcsProjection.PolynomialGnomonicRaDe, WcsProjection.PolynomialPixelProjection, WcsProjection.ThreeStepWcs, WcsProjection.VariableGnomonicRaDe, WcsProjection.VariablePixelProjection, WcsString, WeatherDatabase, WeatherRemainsBad, WeatherSensor, WeatherSql, WeatherStation, WeatherTrigger, WeatherTrigger, WeirdSolZSensor, WifsipCaster, WifsipGuider, WifsipMaster, WifsipMaster.WifsipGeometry, WifsipSimulator, WifsipTelescopeCaster, WifsipWheel, WindmillShutter, WindowMerit, XMLErrorFinalizer, XMLRenderer, XMLScheduler, XMLSequencer, ZenithMerit

public interface PropertyBearing

An interface marking that an object has some properties. The properties consists of string keys matched to Object values. One key can only match to one value, but one value can have different keys attached to it. Note that in most concrete implementations, null will not be a valid key nor a valid value.

It is good practive, if names of key start with 'KEY_' and have an identical name and vale. E.g. KEY_FIRST = "first". Default values for these keys start with variable names like 'DEF', e.g. DEFFIRST = 1.If keys are generated from a prefix, e.g., like in a polygon where each side may be labeled like 'side0', 'side1', etc., the common prefix should be stated with 'PREFIX_', like PREFIX_SIDE = "side" in the above example.


Field Summary
static String CONFIG
          The config directory.
static String KEY_CLASS
          The key mapping to the property container class name.
static String KEY_URLRESOURCES
          The special key defining URL-resources to search.
static String KEY_URLUSECONFIG
          If true, search the config directory for resources.
static String KEY_URLUSECURRENT
          If true, search the current directory for resources.
static String KEY_URLUSEHOME
          If true, search user's home directory for resources.
 
Method Summary
 boolean defaultBoolean(String key, boolean def)
          Tests if the given key is present in the properties of this container.
 boolean defaultChar(String key, char def)
          Tests if the given key is present in the properties of this container.
 boolean defaultDouble(String key, double def)
          Tests if the given key is present in the properties of this container.
 boolean defaultFloat(String key, float def)
          Tests if the given key is present in the properties of this container.
 boolean defaultInt(String key, int def)
          Tests if the given key is present in the properties of this container.
 boolean defaultLong(String key, long def)
          Tests if the given key is present in the properties of this container.
 boolean defaultObject(String key, Class def, String defstring)
          Tests if the given key is present in the properties of this container.
 boolean defaultObject(String key, Object def)
          Tests if the given key is present in the properties of this container.
 Map<String,Object> defaultProperties(Map<String,String> defaults)
          Sets a mapping of default values.
 boolean defaultProperty(String key, String def)
          Tests if the given key is present as a map to a string in this container.
 boolean getAsBoolean(String key)
          Returns the property mapped to the given key as a primitive boolean.
 char getAsChar(String key)
          Returns the property mapped to the given key as a primitive char.
 double getAsDouble(String key)
          Returns the property mapped to the given key as a primitive double.
 float getAsFloat(String key)
          Returns the property mapped to the given key as a primitive float.
 int getAsInt(String key)
          Returns the property mapped to the given key as a primitive int.
 List<String> getAsList(String key)
          Returns the property mapped to the given key as a list of strings, per default separated by a comma.
 long getAsLong(String key)
          Returns the property mapped to the given key as a primitive long.
 Map<String,String> getAsMap(String key)
          Returns the property mapped to the given key as a mapping of strings to strings, per default separated by a colon and an equal sign.
 Object getAsObject(String key)
          Returns the direct mapping of the key.
<T> T
getAsObject(String key, Class<T> oftype)
          Returns the direct mapping of the key.
 Object getLocalized(String key)
          Returns a localized version of a property.
 Map<String,Object> getProperties()
          Returns all properties of this object as a mapping of string keys to object representations.
 String getProperty(String key)
          Gets a property.
 URL getResource(String value)
          Locates a resource using either the default class loader or the URLClassLoader defined with KEY_URLRESOURCES.
 InputStream getResourceAsStream(String key)
          Locates a resource using either the default class loader or the URLClassLoader defined with KEY_URLRESOURCES.
 Enumeration getResources(String key)
          Locates a resource using either the default class loader or the URLClassLoader defined with KEY_URLRESOURCES.
 boolean has(String key)
          Tests if a given property is present in this object's properties.
 Object parseObject(String key, Class forclass)
          Parses a property.
 Object removeProperty(String key)
          Sets a property.
 Object setObject(String key, Object val)
          Sets a property directly as an object.
 String setProperty(String key, String val)
          Sets a property.
 Map<String,String> stringProperties()
          Returns a representation of all properties in this object as a mapping of strings to strings.
 

Field Detail

CONFIG

static final String CONFIG
The config directory.

See Also:
Constant Field Values

KEY_CLASS

static final String KEY_CLASS
The key mapping to the property container class name.

See Also:
Constant Field Values

KEY_URLRESOURCES

static final String KEY_URLRESOURCES
The special key defining URL-resources to search.

See Also:
Constant Field Values

KEY_URLUSEHOME

static final String KEY_URLUSEHOME
If true, search user's home directory for resources.

See Also:
Constant Field Values

KEY_URLUSECURRENT

static final String KEY_URLUSECURRENT
If true, search the current directory for resources.

See Also:
Constant Field Values

KEY_URLUSECONFIG

static final String KEY_URLUSECONFIG
If true, search the config directory for resources.

See Also:
Constant Field Values
Method Detail

getProperties

Map<String,Object> getProperties()
Returns all properties of this object as a mapping of string keys to object representations.


defaultProperties

Map<String,Object> defaultProperties(Map<String,String> defaults)
Sets a mapping of default values. Default mappings should be used when no explicit mapping is given in the objects properties. It is perfectly legal, to grab all mapping from the argument map and add non-defined mapping to this target properties.

Parameters:
defaults - Default mappings of keys to objects.

getProperty

String getProperty(String key)
Gets a property.


stringProperties

Map<String,String> stringProperties()
Returns a representation of all properties in this object as a mapping of strings to strings. This method should be used if the properties are to be stored in a file.


setProperty

String setProperty(String key,
                   String val)
Sets a property. Returns the previous match to the key or null if previously undefined.


removeProperty

Object removeProperty(String key)
Sets a property. Returns the previous match to the key or null if previously undefined.


setObject

Object setObject(String key,
                 Object val)
Sets a property directly as an object. Returns the previous match to the key or null if previously undefined.


has

boolean has(String key)
Tests if a given property is present in this object's properties.


parseObject

Object parseObject(String key,
                   Class forclass)
Parses a property. If the key points to a string instance, we use a single-string constructor of the given class to instantiate an object using the property string. If instantiation is successful, the mapping of the key is replaced to a mapping to this new object. If unsuccessful, the key is deleted.


getAsObject

Object getAsObject(String key)
Returns the direct mapping of the key. This might return a null key. This method is best used after first ensuring that a default mapping to an object of the appropraite class exists.


getAsObject

<T> T getAsObject(String key,
                  Class<T> oftype)
Returns the direct mapping of the key. This might return a null key. This method is best used after first ensuring that a default mapping to an object of the appropraite class exists, see defaultObject(java.lang.String, java.lang.Object).


getAsBoolean

boolean getAsBoolean(String key)
Returns the property mapped to the given key as a primitive boolean. The mapped value is trimmed prior to parsing.


getAsChar

char getAsChar(String key)
Returns the property mapped to the given key as a primitive char. The mapped value is trimmed prior to parsing.

Returns:
Zero on failure.

getAsInt

int getAsInt(String key)
Returns the property mapped to the given key as a primitive int. The mapped value is trimmed prior to parsing.

Returns:
Zero on failure.

getAsLong

long getAsLong(String key)
Returns the property mapped to the given key as a primitive long. The mapped value is trimmed prior to parsing.

Returns:
Zero on failure.

getAsDouble

double getAsDouble(String key)
Returns the property mapped to the given key as a primitive double. The mapped value is trimmed prior to parsing.

Returns:
NaN on failure.

getAsFloat

float getAsFloat(String key)
Returns the property mapped to the given key as a primitive float. The mapped value is trimmed prior to parsing.

Returns:
NaN on failure.

getAsList

List<String> getAsList(String key)
Returns the property mapped to the given key as a list of strings, per default separated by a comma.

Returns:
null if no such property exists.

getAsMap

Map<String,String> getAsMap(String key)
Returns the property mapped to the given key as a mapping of strings to strings, per default separated by a colon and an equal sign.

Returns:
null if no such property exists.

defaultProperty

boolean defaultProperty(String key,
                        String def)
Tests if the given key is present as a map to a string in this container. If not, the default value is mapped to the key, replacing any former mappings of key not pointing to a string object.

Parameters:
key - The properties key to test for a present mapping.
def - The default value of the key. Set if not present.
Returns:
True if the given key was already mapped at method call.

defaultInt

boolean defaultInt(String key,
                   int def)
Tests if the given key is present in the properties of this container. If it is, the mapping is converted into an integer via the Integer.parseInt method. If this conversation fails or if the key is not present in the container, the default value is stored.

Parameters:
key - The properties key to test for a present mapping.
def - The default value of the key. Set if not present.
Returns:
True if the given key was already mapped to an int.

defaultChar

boolean defaultChar(String key,
                    char def)
Tests if the given key is present in the properties of this container. If it is, the mapping is converted into an integer via the Integer.parseInt method. If this conversation fails or if the key is not present in the container, the default value is stored.

Parameters:
key - The properties key to test for a present mapping.
def - The default value of the key. Set if not present.
Returns:
True if the given key was already mapped to an int.

defaultDouble

boolean defaultDouble(String key,
                      double def)
Tests if the given key is present in the properties of this container. If it is, the mapping is converted into a double via the Double.parseDouble method. If this conversation fails or if the key is not present in the container, the default value is stored.

Parameters:
key - The properties key to test for a present mapping.
def - The default value of the key. Set if not present.
Returns:
True if the given key was already mapped to a double.

defaultLong

boolean defaultLong(String key,
                    long def)
Tests if the given key is present in the properties of this container. If it is, the mapping is converted into a long via the Long.parseLong method. If this conversation fails or if the key is not present in the container, the default value is stored.

Parameters:
key - The properties key to test for a present mapping.
def - The default value of the key. Set if not present.
Returns:
True if the given key was already mapped to a long.

defaultFloat

boolean defaultFloat(String key,
                     float def)
Tests if the given key is present in the properties of this container. If it is, the mapping is converted into a float via the Float.parseFloat method. If this conversation fails or if the key is not present in the container, the default value is stored.

Parameters:
key - The properties key to test for a present mapping.
def - The default value of the key. Set if not present.
Returns:
True if the given key was already mapped to a float.

defaultBoolean

boolean defaultBoolean(String key,
                       boolean def)
Tests if the given key is present in the properties of this container. If it is not, the default value is stored as a string representation.

Parameters:
key - The properties key to test for a present mapping.
def - The default value of the key. Set if not present.
Returns:
True if the given key was already mapped to a boolean.

defaultObject

boolean defaultObject(String key,
                      Object def)
Tests if the given key is present in the properties of this container. If it is, the mapping is converted into a new instance of the def object class using the mapped string as the constructor argument. If the construction fails for any reason, the default representation is converted into a string with it's toString method and stored as a property.

Parameters:
key - The properties key to test for a present mapping.
def - The default value of the key. Set if not present.
Returns:
True if the key was mapped to a correct constructor string.

defaultObject

boolean defaultObject(String key,
                      Class def,
                      String defstring)
Tests if the given key is present in the properties of this container. If it is, the mapping is converted into a new instance of the def object class using the mapped string as the constructor argument. If the construction fails for any reason, the default string representation is stored as a property.

Parameters:
key - The properties key to test for a present mapping.
def - The default value of the key. Set if not present.
defstring - The default constructor string.
Returns:
True if the key was mapped to a correct constructor string.

getResource

URL getResource(String value)
Locates a resource using either the default class loader or the URLClassLoader defined with KEY_URLRESOURCES. As for the general contract for resource-finding, first the main class loader tries to locate the resource and only if it failes, the URL's are searched.


getResources

Enumeration getResources(String key)
                         throws IOException
Locates a resource using either the default class loader or the URLClassLoader defined with KEY_URLRESOURCES. As for the general contract for resource-finding, first the main class loader tries to locate the resource and only if it failes, the URL's are searched.

Throws:
IOException

getResourceAsStream

InputStream getResourceAsStream(String key)
Locates a resource using either the default class loader or the URLClassLoader defined with KEY_URLRESOURCES. As for the general contract for resource-finding, first the main class loader tries to locate the resource and only if it failes, the URL's are searched.


getLocalized

Object getLocalized(String key)
Returns a localized version of a property.