scala
trait Product

[source: `scala/Product.scala`]

`` `trait` Product
  `extends` AnyRef

  The trait `Product` defines access functions for instances of products, in particular case classes.

Author
  Burak Emir
Version
  1.0

Direct Known Subclasses:
  TIMEOUT, Exit, !, NamedSend, SyncSend, Reply, SendTo, SyncSendTo, ReplyTo, Node, Database, IncompatibleSchema, UnsupportedFeature, AccessMode.ReadOnly, AccessMode.ReadWrite, Insert, InsertionData.Subquery, InsertionData.Constructor, IsolationLevel.ReadUncommitted, IsolationLevel.ReadCommitted, IsolationLevel.RepeatableRead, IsolationLevel.Serializable, JoinType.Inner, JoinType.Outer.Left, JoinType.Outer.Right, JoinType.Outer.Full, SetClause, SetQuantifier.AllTuples, SetQuantifier.DistinctTuples, Transaction, Update, Default, FunctionCall, TypeCast, Cell, Nil, ::, Option, Some, None, Product1, Product10, Product11, Product12, Product13, Product14, Product15, Product16, Product17, Product18, Product19, Product2, Product20, Product21, Product22, Product3, Product4, Product5, Product6, Product7, Product8, Product9, Seq.singleton, Symbol, Tuple1, Tuple10, Tuple11, Tuple12, Tuple13, Tuple14, Tuple15, Tuple16, Tuple17, Tuple18, Tuple19, Tuple2, Tuple20, Tuple21, Tuple22, Tuple3, Tuple4, Tuple5, Tuple6, Tuple7, Tuple8, Tuple9, ImmutableIterator.Empty, RedBlack.Empty, RedBlack.RedTree, RedBlack.BlackTree, NA, Start, End, Index, Include, Update, Remove, Reset, TIMEOUT, pilib.UGP, pilib.Sum, BytePickle.Ref, BytePickle.Def, Class, Method, Field, TypeField, LocalValue, LocalMethod, NoSymbol, RootSymbol, LabelSymbol, Ident, Select, Literal, Apply, TypeApply, Function, This, Block, New, If, Assign, Target, Goto, ValDef, ClassDef, DefDef, Super, Template, NoPrefix, NoType, NamedType, PrefixedType, SingleType, ThisType, AppliedType, TypeBounds, MethodType, PolyType, SUnit.AssertFailed, DocNil, DocBreak, DocText, DocGroup, DocNest, DocCons, ConsRHS, AnyHedgeRHS, EmptyHedgeRHS, LabelledRHS, AnyTreeRHS, Binders.BoundElement, ~, Parsers.Success, Parsers.Failure, Parsers.Error, StdTokens.Keyword, StdTokens.NumericLit, StdTokens.StringLit, StdTokens.Identifier, Tokens.ErrorToken, Tokens.EOF, Base.Alt, Base.Sequ, Base.Star, Base.Eps, PointedHedgeExp.Node, PointedHedgeExp.TopIter, PointedHedgeExp.Point, WordExp.Letter, WordExp.Wildcard, Comment, EntityRef, Group, MalformedAttributeException, Null, PrettyPrinter.Break, PrettyPrinter.Box, PrettyPrinter.Para, ProcInstr, Text, TopScope, Unparsed, ContentModel.ElemName, PCDATA, EMPTY, ANY, MIXED, ELEMENTS, ElemDecl, AttListDecl, AttrDecl, ParsedEntityDecl, ParameterEntityDecl, UnparsedEntityDecl, NotationDecl, IntDef, ExtDef, PEReference, REQUIRED, IMPLIED, DEFAULT, DocType, SystemID, PublicID, ValidationException, FatalError, Expression.FExp, Expression.Attrib, Expression.Root, Expression.Child, Expression.DescOrSelf, Expression.WildcardTest, Expression.NameTest, Expression.Exists, Expression.Equals, ElemStart, ElemEnd, BasicTransformer.NeedsCopy

Method Summary
`def` | arity : Int return k for a product `A(x_1,...,x_k))`
`def` | element (n : Int) : Any for a case class `A(x_1,...,x_k))`, returns `x_(i+1)` for `0 <= i < k`
`abstract def` | productArity : Int return k for a product `A(x_1,...,x_k))`
`abstract def` | productElement (n : Int) : Any for a case class `A(x_1,...,x_k))`, returns `x_(i+1)` for `0 <= i < k`
`def` | productPrefix : String By default the empty string. Implementations may override this method in order to prepend a string prefix to the result of the toString methods.

Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized

Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

Method Details

`abstract` `def` productElement(n : Int) : Any

  for a case class `A(x_1,...,x_k))`, returns `x_(i+1)` for `0 <= i < k`

Parameters
  `n -` the position of the n-th element
Throws
  `IndexOutOfBoundsException -`
Returns
  ...

@deprecated
`` `def` element(n : Int) : Any

  for a case class `A(x_1,...,x_k))`, returns `x_(i+1)` for `0 <= i < k`

Parameters
  `n -` the position of the n-th element
Throws
  `IndexOutOfBoundsException -`
Returns
  ...

`abstract` `def` productArity : Int

  return k for a product `A(x_1,...,x_k))`

@deprecated
`` `def` arity : Int

  return k for a product `A(x_1,...,x_k))`

`` `def` productPrefix : String

  By default the empty string. Implementations may override this method in order to prepend a string prefix to the result of the toString methods.