|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object scale.clef.LiteralMap
public final class LiteralMap
This class maps from a value to a Clef Literal.
$Id: LiteralMap.java,v 1.24 2007-10-04 19:58:03 burrill Exp $
Copyright 2007 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
This class allows us to have only one instance of a (type, value) tuple.
Constructor Summary | |
---|---|
LiteralMap()
|
Method Summary | |
---|---|
static void |
clear()
Clear out all literals and start over. |
static BooleanLiteral |
put(boolean value,
Type type)
Place an entry in the map unless it is already there. |
static CharLiteral |
put(char value,
Type type)
Place an entry in the map unless it is already there. |
static FloatLiteral |
put(double value,
Type type)
Place an entry in the map unless it is already there. |
static IntLiteral |
put(long value,
Type type)
Place an entry in the map unless it is already there. |
static StringLiteral |
put(java.lang.String value,
Type type)
Place an entry in the map unless it is already there. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LiteralMap()
Method Detail |
---|
public static void clear()
public static IntLiteral put(long value, Type type)
value
- map from this value to the literaltype
- must match for the entry to be there
public static CharLiteral put(char value, Type type)
value
- map from this value to the literaltype
- must match for the entry to be there
public static FloatLiteral put(double value, Type type)
value
- map from this value to the literaltype
- must match for the entry to be there
public static BooleanLiteral put(boolean value, Type type)
value
- map from this value to the literaltype
- must match for the entry to be there
public static StringLiteral put(java.lang.String value, Type type)
value
- map from this value to the literaltype
- must match for the entry to be there
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |