org.apache.myfaces.trinidadinternal.style
Class UnmodifiableStyle

java.lang.Object
  extended by org.apache.myfaces.trinidad.style.Style
      extended by org.apache.myfaces.trinidadinternal.style.UnmodifiableStyle

public class UnmodifiableStyle
extends org.apache.myfaces.trinidad.style.Style

Style implementation for CSS properties. Once created, you cannot mutate since there is no setProperties method. The toInlineString prints the properties out in CSS format, e.g., color: blue; font-size: 12px; To save memory, as the constructor parameter use an ArrayMap instead of a HashMap or ConcurrentHashMap if you can.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/style/CSSStyle.java#0 $) $Date: 10-nov-2005.18:57:55 $

Constructor Summary
UnmodifiableStyle(java.util.Map<java.lang.String,java.lang.String> properties)
          Creates a Style object with the specified properties.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.util.Map<java.lang.String,java.lang.String> getProperties()
           
 int hashCode()
           
 java.lang.String toInlineString()
          Converts the style to a String suitable for use as an inline style attribute value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnmodifiableStyle

public UnmodifiableStyle(java.util.Map<java.lang.String,java.lang.String> properties)
Creates a Style object with the specified properties. There is no no-argument constructor because you must pass in all your properties when you create your object.

Parameters:
properties - The properties of this style, like background-color, blue. The values must be Strings.
Throws:
java.lang.NullPointerException - if properties is null
Method Detail

getProperties

public java.util.Map<java.lang.String,java.lang.String> getProperties()
Specified by:
getProperties in class org.apache.myfaces.trinidad.style.Style

toInlineString

public java.lang.String toInlineString()
Converts the style to a String suitable for use as an inline style attribute value.

Specified by:
toInlineString in class org.apache.myfaces.trinidad.style.Style

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.