de.dante.extex.interpreter
Class FlagsImpl

java.lang.Object
  extended byde.dante.extex.interpreter.FlagsImpl
All Implemented Interfaces:
Flags

public class FlagsImpl
extends java.lang.Object
implements Flags

This class implements a set of flags. This is needed to pass controlling information to primitives.

Version:
$Revision: 1.12 $
Author:
Gerd Neugebauer

Field Summary
 
Fields inherited from interface de.dante.extex.interpreter.Flags
NONE
 
Constructor Summary
FlagsImpl()
          Creates a new object.
 
Method Summary
 void clear()
          This method clears all flags.
 boolean clearExpanded()
          Setter for the expanded flag.
 boolean clearGlobal()
          Setter for the global flag.
 boolean clearImmediate()
          Setter for the immediate flag.
 boolean clearLong()
          Setter for the long flag.
 boolean clearOuter()
          Setter for the outer flag.
 boolean clearProtected()
          Setter for the protected flag.
 Flags copy()
          Clone an instance.
 java.lang.String[] get()
          Getter for the text representations of the flags currently set.
 boolean isDirty()
          Test if all flags are cleared.
 boolean isExpanded()
          Getter for the expanded flag.
 boolean isGlobal()
          Getter for the global flag.
 boolean isImmediate()
          Getter for the immediate flag.
 boolean isLong()
          Getter for the long flag.
 boolean isOuter()
          Getter for the outer flag.
 boolean isProtected()
          Getter for the protected flag.
 void set(Flags flags)
          Copy the flag settings from a given instance int this instance.
 void setExpanded()
          Setter for the expanded flag.
 void setGlobal()
          Setter for the global flag.
 void setGlobal(boolean value)
          Setter for the global flag.
 void setImmediate()
          Setter for the immediate flag.
 void setLong()
          Setter for the long flag.
 void setOuter()
          Setter for the outer flag.
 void setProtected()
          Setter for the protected flag.
 java.lang.String toString()
           
 java.lang.String toText()
          Determine a printable representation of the flags set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FlagsImpl

public FlagsImpl()
Creates a new object. Initially no flags are set.

Method Detail

clear

public void clear()
This method clears all flags.

Specified by:
clear in interface Flags

clearExpanded

public boolean clearExpanded()
Description copied from interface: Flags
Setter for the expanded flag. The flag is reset to false.

Specified by:
clearExpanded in interface Flags
Returns:
the old value of the expanded flag
See Also:
Flags.clearExpanded()

clearGlobal

public boolean clearGlobal()
Description copied from interface: Flags
Setter for the global flag. The flag is reset to false.

Specified by:
clearGlobal in interface Flags
Returns:
the old value of the global flag
See Also:
Flags.clearGlobal()

clearImmediate

public boolean clearImmediate()
Description copied from interface: Flags
Setter for the immediate flag. The flag is reset to false.

Specified by:
clearImmediate in interface Flags
Returns:
the old value of the immediate flag
See Also:
Flags.clearImmediate()

clearLong

public boolean clearLong()
Description copied from interface: Flags
Setter for the long flag. The flag is reset to false.

Specified by:
clearLong in interface Flags
Returns:
the old value of the long flag
See Also:
Flags.clearLong()

clearOuter

public boolean clearOuter()
Description copied from interface: Flags
Setter for the outer flag. The flag is reset to false.

Specified by:
clearOuter in interface Flags
Returns:
the old value of the outer flag
See Also:
Flags.clearOuter()

clearProtected

public boolean clearProtected()
Description copied from interface: Flags
Setter for the protected flag. The flag is reset to false.

Specified by:
clearProtected in interface Flags
Returns:
the old value of the protected flag
See Also:
Flags.clearProtected()

copy

public Flags copy()
Description copied from interface: Flags
Clone an instance.

Specified by:
copy in interface Flags
Returns:
a copy of the instance
See Also:
Flags.copy()

get

public java.lang.String[] get()
Description copied from interface: Flags
Getter for the text representations of the flags currently set.

Specified by:
get in interface Flags
Returns:
the array of flag names
See Also:
Flags.get()

isDirty

public boolean isDirty()
Description copied from interface: Flags
Test if all flags are cleared.

Specified by:
isDirty in interface Flags
Returns:
true iff not all flags are cleared
See Also:
Flags.isDirty()

isExpanded

public boolean isExpanded()
Getter for the expanded flag.

Specified by:
isExpanded in interface Flags
Returns:
the current value of the expanded flag
See Also:
Flags.clearExpanded(), Flags.setExpanded()

isGlobal

public boolean isGlobal()
Getter for the global flag.

Specified by:
isGlobal in interface Flags
Returns:
the current value of the global flag
See Also:
Flags.clearGlobal(), Flags.setGlobal(), Flags.setGlobal(boolean)

isImmediate

public boolean isImmediate()
Getter for the immediate flag.

Specified by:
isImmediate in interface Flags
Returns:
the current value of the immediate flag
See Also:
Flags.clearImmediate(), Flags.setImmediate()

isLong

public boolean isLong()
Getter for the long flag.

Specified by:
isLong in interface Flags
Returns:
the current value of the long flag
See Also:
Flags.clearLong(), Flags.setLong()

isOuter

public boolean isOuter()
Getter for the outer flag.

Specified by:
isOuter in interface Flags
Returns:
the current value of the outer flag
See Also:
Flags.clearOuter(), Flags.setOuter()

isProtected

public boolean isProtected()
Description copied from interface: Flags
Getter for the protected flag.

Specified by:
isProtected in interface Flags
Returns:
the current value of the protected flag
See Also:
Flags.isProtected()

set

public void set(Flags flags)
Description copied from interface: Flags
Copy the flag settings from a given instance int this instance.

Specified by:
set in interface Flags
Parameters:
flags - the flags to copy
See Also:
Flags.set( de.dante.extex.interpreter.Flags)

setExpanded

public void setExpanded()
Setter for the expanded flag.

Specified by:
setExpanded in interface Flags
See Also:
Flags.clearExpanded(), Flags.isExpanded()

setGlobal

public void setGlobal()
Setter for the global flag.

Specified by:
setGlobal in interface Flags
See Also:
Flags.clearGlobal(), Flags.isGlobal(), Flags.setGlobal(boolean)

setGlobal

public void setGlobal(boolean value)
Setter for the global flag.

Specified by:
setGlobal in interface Flags
Parameters:
value - the new value for the global flag
See Also:
Flags.clearGlobal(), Flags.isGlobal(), Flags.setGlobal()

setImmediate

public void setImmediate()
Setter for the immediate flag.

Specified by:
setImmediate in interface Flags
See Also:
Flags.clearImmediate(), Flags.isImmediate()

setLong

public void setLong()
Setter for the long flag.

Specified by:
setLong in interface Flags
See Also:
Flags.clearLong(), Flags.isLong()

setOuter

public void setOuter()
Setter for the outer flag.

Specified by:
setOuter in interface Flags
See Also:
Flags.clearOuter(), Flags.isOuter()

setProtected

public void setProtected()
Description copied from interface: Flags
Setter for the protected flag. The flag is set to true.

Specified by:
setProtected in interface Flags
See Also:
Flags.setProtected()

toString

public java.lang.String toString()
See Also:
Object.toString()

toText

public java.lang.String toText()
Description copied from interface: Flags
Determine a printable representation of the flags set. The representation takes into account the current locale.

Specified by:
toText in interface Flags
Returns:
the list
See Also:
Flags.toText()