程序包 weka.core.xml

类 PropertyHandler

java.lang.Object
weka.core.xml.PropertyHandler
所有已实现的接口:
RevisionHandler

public class PropertyHandler extends Object implements RevisionHandler
This class stores information about properties to ignore or properties that are allowed for a certain class.
版本:
$Revision: 1.4 $
作者:
FracPete (fracpete at waikato dot ac dot nz)
  • 构造器概要

    构造器
    构造器
    说明
    initializes the handling
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    addAllowed(Class c, String displayName)
    adds the given property (display name) to the list of allowed properties for the specified class.
    void
    addIgnored(Class c, String displayName)
    adds the given class with the display name of a property to the ignore list.
    void
    addIgnored(String displayName)
    adds the given display name of a property to the ignore list.
    returns an enumeration of the classnames for which only certain properties (display names) are allowed
    Returns the revision string.
    returns an enumeration of the stored display names and classes of properties to ignore.
    NOTE: String and Class Objects are mixed in this enumeration, depending whether it is a global property to ignore or just one for a certain class!
    boolean
    isAllowed(Class c, String displayName)
    returns whether the given property (display name) is allowed for the given class.
    boolean
    isAllowed(Object o, String displayName)
    returns whether the given property (display name) is allowed for the given object .
    boolean
    isIgnored(Class c, String displayName)
    checks whether the given display name of a certain class is an ignored property.
    boolean
    isIgnored(Object o, String displayName)
    checks whether the given display name of a given object is an ignored property.
    boolean
    isIgnored(String displayName)
    checks whether the given display name is an ignored property
    boolean
    removeAllowed(Class c, String displayName)
    removes the given property (display name) for the specified class from the list of allowed properties.
    boolean
    removeIgnored(Class c, String displayName)
    removes the given display name from the ignore list of the class.
    boolean
    removeIgnored(String displayName)
    removes the given display name from the ignore list.

    从类继承的方法 java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 构造器详细资料

    • PropertyHandler

      public PropertyHandler()
      initializes the handling
  • 方法详细资料

    • ignored

      public Enumeration ignored()
      returns an enumeration of the stored display names and classes of properties to ignore.
      NOTE: String and Class Objects are mixed in this enumeration, depending whether it is a global property to ignore or just one for a certain class!
      返回:
      the display names and classes
      另请参阅:
      • m_Ignored
    • addIgnored

      public void addIgnored(String displayName)
      adds the given display name of a property to the ignore list. Can either be a complete path (e.g. __root__.options) or only a property name (e.g. options). In the latter case it matches all occurences of this display name.
      参数:
      displayName - the property to ignore
      另请参阅:
      • m_Ignored
    • addIgnored

      public void addIgnored(Class c, String displayName)
      adds the given class with the display name of a property to the ignore list. I.e. this property is only ignored for this class.
      参数:
      c - the class for which a property is to be ignored
      displayName - the property to ignore
      另请参阅:
      • m_Ignored
    • removeIgnored

      public boolean removeIgnored(String displayName)
      removes the given display name from the ignore list. returns whether the removing was succesful, i.e. whether the display name was in the list.
      参数:
      displayName - the property to remove from the ignore list
      返回:
      whether the ignore list contained the specified property
      另请参阅:
      • m_Ignored
    • removeIgnored

      public boolean removeIgnored(Class c, String displayName)
      removes the given display name from the ignore list of the class. returns whether the removing was succesful, i.e. whether the display name was in the list.
      参数:
      c - the class to remove the property from
      displayName - the property to remove from the ignore list
      返回:
      whether the ignore list contained the specified property
      另请参阅:
      • m_Ignored
    • isIgnored

      public boolean isIgnored(String displayName)
      checks whether the given display name is an ignored property
      参数:
      displayName - the property to check whether it is on the ignore list
      返回:
      whether the property is in the ignored list
      另请参阅:
      • m_Ignored
    • isIgnored

      public boolean isIgnored(Class c, String displayName)
      checks whether the given display name of a certain class is an ignored property. It only checks for this certain class and no derivative classes. If you also want to check for derivative classes, use isIgnored(Object,String).
      参数:
      c - the class to check the property for
      displayName - the property to check whether it is on the ignore list
      返回:
      whether the property is in the ignored list
      另请参阅:
    • isIgnored

      public boolean isIgnored(Object o, String displayName)
      checks whether the given display name of a given object is an ignored property. The object is checked for each stored class whether it is an instanceof. If the class is not stored then it will default to false, since there are no restrictions for this class.
      参数:
      o - the object to check the property for
      displayName - the property to check whether it is on the ignore list
      返回:
      whether the property is in the ignored list
      另请参阅:
      • m_Ignored
    • allowed

      public Enumeration allowed()
      returns an enumeration of the classnames for which only certain properties (display names) are allowed
      返回:
      the classnames with restriction to properties
    • addAllowed

      public void addAllowed(Class c, String displayName)
      adds the given property (display name) to the list of allowed properties for the specified class.
      参数:
      c - the class to add a property for
      displayName - the property to allow for the class
      另请参阅:
      • m_Allowed
    • removeAllowed

      public boolean removeAllowed(Class c, String displayName)
      removes the given property (display name) for the specified class from the list of allowed properties.
      参数:
      c - the class to remove the property for
      displayName - the property to remove
      返回:
      whether the property was found
      另请参阅:
      • m_Allowed
    • isAllowed

      public boolean isAllowed(Class c, String displayName)
      returns whether the given property (display name) is allowed for the given class. It only checks for this certain class and no derivative classes. If you also want to check for derivative classes, use isAllowed(Object,String).
      参数:
      c - the class to check the property for
      displayName - the property (display name) to check
      返回:
      whether the property is allowed in that context
      另请参阅:
    • isAllowed

      public boolean isAllowed(Object o, String displayName)
      returns whether the given property (display name) is allowed for the given object . The object is checked for each stored class whether it is an instanceof. If the class is not stored then it will default to true, since there are no restrictions for this class.
      参数:
      o - the object to check the property for
      displayName - the property (display name) to check
      返回:
      whether the property is allowed in that context
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      返回:
      the revision