CICS® Transaction Gateway Programming Reference V3.1

com.ibm.ctg.epi
Class Map

java.lang.Object
  |
  +--com.ibm.ctg.epi.Map

public class Map
extends java.lang.Object
implements java.io.Serializable

This class represents a BMS map. It contains data about the size of the map and the location of each field within it, so it can be matched with a screen.

See Also:
Serialized Form

Field Summary
protected  FieldData[] fieldData
          FieldData class contains information about one field
protected  int[] fieldIndex
          field index lists the indices of the fields that are labelled
protected  java.lang.String[] fieldLabels
          array of field labels
protected  MapData mapData
          MapData class contains information about the map
protected  Screen screen
          the screen
protected  boolean valid
          true if the screen object matches this map
 
Constructor Summary
protected Map(Map map)
          Constructs a Map object from another Map.
  Map(MapData md, int[] fi, FieldData[] fd)
          Constructs a Map object
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true if the given object is a Map equivalent to this one.
 Field field(int index)
          Return the field at the given index within this map.
 Field field(int row, int column)
          Return the field at the given row and column within this map
 java.lang.String[] getFieldLabels()
          Returns the names of the fields.
 java.lang.String getName()
          Returns the name of the map.
 Screen getScreen()
          Returns the screen associated with this map.
 boolean isValid()
          Returns true if map is currently valid
protected  Field namedField(int index)
          Return the nth labelled field
 void setScreen(Screen s)
          Set the screen associated with this map and check if it is valid
 java.lang.String toString()
          Returns a String representation of the Map.
protected  void validate()
          Validates map against the current screen
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

screen

protected transient Screen screen
the screen

mapData

protected MapData mapData
MapData class contains information about the map

fieldIndex

protected int[] fieldIndex
field index lists the indices of the fields that are labelled

fieldData

protected FieldData[] fieldData
FieldData class contains information about one field

fieldLabels

protected java.lang.String[] fieldLabels
array of field labels

valid

protected transient boolean valid
true if the screen object matches this map
Constructor Detail

Map

public Map(MapData md,
           int[] fi,
           FieldData[] fd)
Constructs a Map object
Parameters:
md - a MapData object describing this map
fi - an index of labelled fields
fd - an array of FieldData objects describing the fields in this map

Map

protected Map(Map map)
Constructs a Map object from another Map.
Parameters:
map - a Map object
Method Detail

isValid

public boolean isValid()
Returns true if map is currently valid
Returns:
true if the map is valid

setScreen

public void setScreen(Screen s)
Set the screen associated with this map and check if it is valid
Parameters:
s - the screen

getScreen

public Screen getScreen()
Returns the screen associated with this map.

field

public Field field(int index)
Return the field at the given index within this map.
Parameters:
index - the index of the required field
Returns:
the field, or null if the screen is not valid

field

public Field field(int row,
                   int column)
Return the field at the given row and column within this map
Parameters:
row - the row
row - the column
Returns:
the field, or null if screen is not valid

validate

protected void validate()
Validates map against the current screen

namedField

protected Field namedField(int index)
Return the nth labelled field
Parameters:
index - the index of the required field
Returns:
the field, or null if not valid

getName

public java.lang.String getName()
Returns the name of the map.
Returns:
the name of the map

getFieldLabels

public java.lang.String[] getFieldLabels()
Returns the names of the fields.
Returns:
array of field labels

equals

public boolean equals(java.lang.Object o)
Returns true if the given object is a Map equivalent to this one.
Parameters:
o - an Object
Returns:
true if the Object is the same as this Map
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Returns a String representation of the Map.
Returns:
the name of this Map
Overrides:
toString in class java.lang.Object

© Copyright IBM Corp. 1994, 1999