\HeaderA{XStringViews-constructors}{Basic functions for creating or modifying XStringViews objects}{XStringViews.Rdash.constructors}
\aliasA{adjacentViews}{XStringViews-constructors}{adjacentViews}
\aliasA{BStringViews}{XStringViews-constructors}{BStringViews}
\aliasA{BStringViews,ANY-method}{XStringViews-constructors}{BStringViews,ANY.Rdash.method}
\aliasA{BStringViews,file-method}{XStringViews-constructors}{BStringViews,file.Rdash.method}
\aliasA{BStringViews,XString-method}{XStringViews-constructors}{BStringViews,XString.Rdash.method}
\aliasA{BStringViews,XStringViews-method}{XStringViews-constructors}{BStringViews,XStringViews.Rdash.method}
\aliasA{XStringViews}{XStringViews-constructors}{XStringViews}
\aliasA{XStringViews,ANY-method}{XStringViews-constructors}{XStringViews,ANY.Rdash.method}
\aliasA{XStringViews,XString-method}{XStringViews-constructors}{XStringViews,XString.Rdash.method}
\aliasA{XStringViews,XStringViews-method}{XStringViews-constructors}{XStringViews,XStringViews.Rdash.method}
\keyword{methods}{XStringViews-constructors}
\begin{Description}\relax
A set of basic functions for creating or modifying XStringViews objects.
\end{Description}
\begin{Usage}
\begin{verbatim}
  XStringViews(x, subjectClass, collapse="")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] An \LinkA{XString}{XString} object or a character vector for \code{XStringViews}.

\item[\code{subjectClass}] The class to be given to the subject of the \LinkA{XStringViews}{XStringViews} object
created and returned by the function.
Must be the name of one of the direct XString subclasses i.e.
\code{"BString"}, \code{"DNAString"}, \code{"RNAString"}
or \code{"AAString"}.

\item[\code{collapse}] An optional character string to be inserted between the views of the
\LinkA{XStringViews}{XStringViews} object created and returned by the function.

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The \code{XStringViews} constructor will try to create an XStringViews
object from the value passed to its \code{x} argument.
If \code{x} itself is an XStringViews object, the returned
object is obtained by coercing its subject to the class specified by
\code{subjectClass}.
If \code{x} is an \LinkA{XString}{XString} object, the returned object is made of
a single view that starts at the first letter and ends at the last letter
of \code{x} (in addition \code{x} itself is coerced to the class
specified by \code{subjectClass} when specified).
If \code{x} is a character vector, the returned object has one view
per character string in \code{x} (and its subject is an instance of
the class specified by \code{subjectClass}).
\end{Details}
\begin{Value}
An XStringViews object \code{y}.
\code{length(y)} (the number of views in \code{y})
is \code{1} when \code{x} is an \LinkA{XString}{XString} object
and \code{length(x)} otherwise.
\end{Value}
\begin{SeeAlso}\relax
\LinkA{XStringViews-class}{XStringViews.Rdash.class},
\LinkA{XString-class}{XString.Rdash.class}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
  v12 <- Views(DNAString("TAATAATG"), start=-2:9, end=0:11)
  XStringViews(v12, subjectClass="RNAString")
  XStringViews(AAString("MARKSLEMSIR*"))
  XStringViews("abcdefghij", subjectClass="BString")
\end{ExampleCode}
\end{Examples}

