程序包 weka.core
类 PropertyPath
java.lang.Object
weka.core.PropertyPath
- 所有已实现的接口:
RevisionHandler
A helper class for accessing properties in nested objects, e.g., accessing
the "getRidge" method of a LinearRegression classifier part of
MultipleClassifierCombiner, e.g., Vote. For doing so, one needs to
supply the object to work on and a property path. The property path is a
dot delimited path of property names ("getFoo()" and "setFoo(int)" have
"foo" as property name), indices of arrays are 0-based. E.g.:
getPropertyDescriptor(vote, "classifiers[1].ridge")
will return
the second classifier (which should be our LinearRegression) of the given
Vote meta-classifier and there the property descriptor of the "ridge"
property. getValue(...)
will return the actual value of the
ridge parameter and setValue(...)
will set it.- 版本:
- $Revision: 4742 $
- 作者:
- fracpete (fracpete at waikato dot ac dot nz)
-
嵌套类概要
嵌套类修饰符和类型类说明static class
Contains a (property) path structurestatic class
Represents a single element of a property path -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static weka.core.PropertyPath.PropertyContainer
find
(Object src, PropertyPath.Path path) returns the property and object associated with the given path, null if a problem occurred.static PropertyDescriptor
getPropertyDescriptor
(Object src, String path) returns the property associated with the given pathstatic PropertyDescriptor
getPropertyDescriptor
(Object src, PropertyPath.Path path) returns the property associated with the given path, null if a problem occurred.Returns the revision string.static Object
returns the value specified by the given path from the objectstatic Object
getValue
(Object src, PropertyPath.Path path) returns the value specified by the given path from the objectstatic void
for testing onlystatic void
set the given value specified by the given path in the objectstatic boolean
setValue
(Object src, PropertyPath.Path path, Object value) set the given value specified by the given path in the object
-
构造器详细资料
-
PropertyPath
public PropertyPath()
-
-
方法详细资料
-
find
returns the property and object associated with the given path, null if a problem occurred.- 参数:
src
- the object to start frompath
- the path to follow- 返回:
- not null, if the property could be found
-
getPropertyDescriptor
returns the property associated with the given path, null if a problem occurred.- 参数:
src
- the object to start frompath
- the path to follow- 返回:
- not null, if the property could be found
-
getPropertyDescriptor
returns the property associated with the given path- 参数:
src
- the object to start frompath
- the path to follow- 返回:
- not null, if the property could be found
-
getValue
returns the value specified by the given path from the object- 参数:
src
- the object to work onpath
- the retrieval path- 返回:
- the value, null if an error occurred
-
getValue
returns the value specified by the given path from the object- 参数:
src
- the object to work onpath
- the retrieval path- 返回:
- the value, null if an error occurred
-
setValue
set the given value specified by the given path in the object- 参数:
src
- the object to work onpath
- the retrieval pathvalue
- the value to set- 返回:
- true if the value could be set
-
setValue
set the given value specified by the given path in the object- 参数:
src
- the object to work onpath
- the retrieval pathvalue
- the value to set
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-
main
for testing only- 参数:
args
- the commandline options - ignored- 抛出:
Exception
- if something goes wrong
-