Package snap.props

Class PropSet

java.lang.Object
snap.props.PropSet

public class PropSet extends Object
This class holds a list of props for a PropObject class.
  • Constructor Details

    • PropSet

      public PropSet(Class<? extends PropObject> propObjectClass)
      Constructor.
  • Method Details

    • getPropObjectClass

      public Class<? extends PropObject> getPropObjectClass()
      Returns the PropObject class.
    • getProps

      public Prop[] getProps()
      Returns the props.
    • addProp

      public void addProp(Prop aProp)
      Adds a Prop.
    • removeProp

      public void removeProp(int anIndex)
      Removes prop at given index.
    • removeProp

      public void removeProp(Prop aProp)
      Removes prop at given index.
    • getPropForName

      public Prop getPropForName(String aName)
      Returns a prop for given name.
    • addPropNamed

      public Prop addPropNamed(String aPropName, Class<?> aClass)
      Adds new property for given name and class.
    • addPropNamed

      public Prop addPropNamed(String aPropName, Class<?> aClass, Object aDefault)
      Adds new property for given name, class and default value.
    • getDefaultInstance

      public PropObject getDefaultInstance()
      Returns the default object.
    • getPropNames

      public String[] getPropNames()
      Returns all known property names.
    • getArchivalProps

      public Prop[] getArchivalProps()
      Returns array of archival props (Prop.SkipArchival is false).
    • clearCaches

      protected void clearCaches()
      Clears any caches.
    • toString

      public String toString()
      Standard toString implementation.
      Overrides:
      toString in class Object
    • getPropSetForPropObject

      public static PropSet getPropSetForPropObject(PropObject aPropObj)
      Returns the PropSet for given class.