topical media & game development

talk show tell print

actionscript-book-PlayList-com-example-programmingas3-playlist-SortProperty.ax

actionscript-book-PlayList-com-example-programmingas3-playlist-SortProperty.ax [swf] flex


  package com.example.programmingas3.playlist
  {
          
A pseudo-enum representing the different properties by which a Song instance can be sorted.

  
          public final class @ax-actionscript-book-PlayList-com-example-programmingas3-playlist-SortProperty
          {
                  // ------- Public Constants -------
                  
                  // These constants represent the different properties
                  // that the list of songs can be sorted by,
                  // providing a mechanism to map a "friendly" name to the actual property name
                  public static const TITLE:@ax-actionscript-book-PlayList-com-example-programmingas3-playlist-SortProperty = new @ax-actionscript-book-PlayList-com-example-programmingas3-playlist-SortProperty("title");
                  public static const ARTIST:@ax-actionscript-book-PlayList-com-example-programmingas3-playlist-SortProperty = new @ax-actionscript-book-PlayList-com-example-programmingas3-playlist-SortProperty("artist");
                  public static const YEAR:@ax-actionscript-book-PlayList-com-example-programmingas3-playlist-SortProperty = new @ax-actionscript-book-PlayList-com-example-programmingas3-playlist-SortProperty("year");
  
                  
                  // ------- Private Variables -------
                  private var _propertyName:String;
  
                  // ------- Constructor -------
                  
                  public function @ax-actionscript-book-PlayList-com-example-programmingas3-playlist-SortProperty(property:String)
                  {
                          _propertyName = property;
                  }
  
                  // ------- Public Properties -------
                  
                  public function get propertyName():String
                  {
                          return _propertyName;
                  }
          }
  }


(C) Æliens 27/08/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.