com.sas.models
Class AlphabeticSequencer

com.sas.models.AlphabeticSequencer
All Implemented Interfaces:
ModelInterface, com.sas.util.Countable, IndexedGetInterface, java.io.Serializable

public class AlphabeticSequencer
implements IndexedGetInterface, ModelInterface, java.io.Serializable

AlphabeticSequencer is a utility that assigns a sequence of characters of the alphabet to a given integer value. For example "A" is returned for the integer value 1, "B" for 2, "AA" for 27, "BB" for 28, etc.

See Also:
Serialized Form

Field Summary
static AlphabeticSequencer defaultInstance
          Default instance of AlphabeticSequencer.
 
Constructor Summary
AlphabeticSequencer()
          Constructs an AlphabeticSequencer object.
 
Method Summary
 boolean attachView()
          Signals that an AlphabeticSequencer is being attached to a view.
 int count()
          count() is implemented since it's part of the IndexedGetInterface which extends Countable.
 void detachView()
          Signals that an AlphabeticSequencer is being detached from a view.
 java.lang.Object get(int index)
          Returns a sequence of characters associated with a given integer value.
 

Field Detail

defaultInstance

public static AlphabeticSequencer defaultInstance
Default instance of AlphabeticSequencer.

Constructor Detail

AlphabeticSequencer

public AlphabeticSequencer()
Constructs an AlphabeticSequencer object.

Method Detail

get

public java.lang.Object get(int index)
Returns a sequence of characters associated with a given integer value. For example "A" is returned for the integer value 1, "B" for 2, "AA" for 27, "BB" for 28, etc.

Specified by:
get in interface IndexedGetInterface
Parameters:
index - index to associate a sequence of characters with
Returns:
sequence of characters

count

public int count()
count() is implemented since it's part of the IndexedGetInterface which extends Countable. There really is not an inherent count to the AlphabeticSequencer, but it returns 26 so that the alphabet can be returned.

Specified by:
count in interface com.sas.util.Countable

attachView

public boolean attachView()
Signals that an AlphabeticSequencer is being attached to a view. This provides an implementation for ModelInterface. True is always returned.

Specified by:
attachView in interface ModelInterface
Returns:
true allowing an attach to a view
See Also:
ModelInterface.detachView(), ViewInterface.attachModel(com.sas.ModelInterface)

detachView

public void detachView()
Signals that an AlphabeticSequencer is being detached from a view. This provides an implmenetation for ModelInterface.

Specified by:
detachView in interface ModelInterface
See Also:
ModelInterface.attachView(), ViewInterface.detachModel(com.sas.ModelInterface)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.