razie.base

ScalaAttrAccess

trait ScalaAttrAccess extends JavaAttrAccess

simple attribute access interface and implementation - a bunch of name-value pairs with many different constructors - everything these days has attributes.

it is used throughout to access parms in a unified manner: from http requests, method arguments, properties etc

It has a skeleton type definition.

Note the funny behavior of setAttr ("attrname:type", value)...

Note the funny behavior of setAttr ("attrname:type=value,attrname2:type=value")...

Linear Supertypes
JavaAttrAccess, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ScalaAttrAccess
  2. JavaAttrAccess
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def a(name: String): AnyRef

    I'm really starting to hate typing.

    I'm really starting to hate typing... shortcut for getAttr

  2. abstract def addToUrl(url: String): String

    add these attributes to an url, respecting the url parm format, i.

    add these attributes to an url, respecting the url parm format, i.e. getMovie?name=300.divx&producer=whoknows

  3. abstract def filter(f: (String, AnyRef) ⇒ Boolean): Iterable[String]

  4. abstract def foreach(f: (String, AnyRef) ⇒ Unit): Unit

  5. abstract def get[T](name: String): Option[T]

    returns

    the value of the named attribute or null, coerced into an option of the given type

  6. abstract def getAttr(name: String): AnyRef

    returns

    the value of the named attribute or null

  7. abstract def getAttrType(name: String): AttrType

    returns

    the type of the named attribute OR null if not known. Default is by convention String

  8. abstract def getOrElse(name: String, dflt: AnyRef): AnyRef

    returns

    the value of the named attribute or null

  9. abstract def getPopulatedAttr(): Iterable[String]

    iterate through the populated attributes.

    iterate through the populated attributes. BE very careful: if you set attrs with NULL values, they are NOT populated!

  10. abstract def hasAttrType(name: String): Boolean

    check if an attribute is populated

  11. abstract def isPopulated(name: String): Boolean

    check if an attribute is populated

  12. abstract def map[A, B](f: (String, A) ⇒ B): ScalaAttrAccess

  13. abstract def mapValues[A, B](f: (A) ⇒ B): Seq[B]

  14. abstract def sa(name: String): String

    most of the time they're just strings - i'll typecast here.

    most of the time they're just strings - i'll typecast here... this is a() typcast to String

    returns

    "" or the actual toString of the respective value

  15. abstract def set(name: String, value: Any, t: AttrType): Unit

    set the value of the named attribute + the name can be of the form name:type

  16. abstract def set(name: String, value: Any): Unit

    set the value of the named attribute + the name can be of the form name:type

  17. abstract def setAttr(pairs: <repeated...>[AnyRef]): Unit

    Definition Classes
    JavaAttrAccess
  18. abstract def setAttrPair(name: String, value: Any): Unit

    set the value of the named attribute + the name can be of the form name:type

  19. abstract def setAttrType(name: String, ttype: AttrType): Unit

    set the type of the named attribute

  20. abstract def sgetPopulatedAttr: Iterable[String]

  21. abstract def size(): Int

    the number of populated attributes

  22. abstract def toJson(obj: JSONObject): JSONObject

    add my attributes to the JSONObject passed in.

    add my attributes to the JSONObject passed in. If null passed in, empty object is created first

    obj

    an json object to add to or null if this is a single element

    returns

  23. abstract def toPairs(): Array[AnyRef]

    same pairs format name,value,name,value.

    same pairs format name,value,name,value...

  24. abstract def toXml(): String

    some random xml format

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from JavaAttrAccess

Inherited from AnyRef

Inherited from Any

Ungrouped