jsdsi
Class SimpleTag
java.lang.Object
jsdsi.Obj
jsdsi.Tag
jsdsi.ExprTag
jsdsi.SimpleTag
- All Implemented Interfaces:
- java.io.Serializable
- public class SimpleTag
- extends ExprTag
A tag that contains a string type and a sequence of other tags.
- Version:
- $Revision: 1.3.2.1 $ $Date: 2005/11/08 03:12:52 $
- Author:
- Sameer Ajmani, Sean Radford
- See Also:
- Serialized Form
| Fields inherited from class jsdsi.Obj |
_obj |
|
Constructor Summary |
SimpleTag(java.lang.String v,
ExprTag[] t)
Creates a new SimpleTag from a string and an array
of tags. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
SimpleTag
public SimpleTag(java.lang.String v,
ExprTag[] t)
- Creates a new
SimpleTag from a string and an array
of tags.
- Parameters:
v - type of this SimpleTag.t - sequence of tags.
intersect
public Tag intersect(Tag that)
- If
that is a SimpleTag, returns
intersect((SimpleTag)that). If that is
a SetTag, returns that.intersect(this). Otherwise
returns NULL_TAG.
- Specified by:
intersect in class Tag
- Parameters:
that - tag to intersect this with.
- Returns:
- the intersection of this
Tag and that. - See Also:
Tag.intersect(Tag)
intersect
public Tag intersect(SimpleTag that)
- If
that has the same value as this,
intersect returns a new SimpleTag as long as the
longer of the two tags whose elements are the intersection of the
corresponding elements. Elements past the end of the shorter tag
are copied from the longer tag. If any of the intersections is
not an ExprTag, or if that is not a SimpleTag, or if
that's value differs from this's value,
intersect returns NULL_TAG.
equals
public boolean equals(java.lang.Object that)
- Specified by:
equals in class Obj
- See Also:
Object.equals(Object)
hashCode
public int hashCode()
- Specified by:
hashCode in class Obj
- See Also:
Object.hashCode()
getValue
public java.lang.String getValue()
- Returns:
- the string value of this
SimpleTag.
getTags
public ExprTag[] getTags()
- Returns:
- the tags of this
SimpleTag.
toTagSexp
public Sexp toTagSexp()
- Specified by:
toTagSexp in class Tag
Copyright © 2002-2006 JSDSI. All Rights Reserved.