Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: samples/total/client/IndexedValue.dart

Issue 10635015: Delete proxy and total samples, which have bit-rotted. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/total/client/IdGenerator.dart ('k') | samples/total/client/InnerMenuView.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/total/client/IndexedValue.dart
===================================================================
--- samples/total/client/IndexedValue.dart (revision 9011)
+++ samples/total/client/IndexedValue.dart (working copy)
@@ -1,46 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Utility class used for sorting spreadsheet columns
-class IndexedValue {
- // Sort numbers, followed by non-blank strings, followed by blanks
- static final int NUMBER = 0;
- static final int STRING = 1;
- static final int BLANK = 2;
-
- int _class;
- double _dValue;
- int _index;
- String _sValue;
-
- int get index() => _index;
-
- IndexedValue.blank(this._index) {
- _class = BLANK;
- }
-
- IndexedValue.number(this._index, this._dValue) {
- _class = NUMBER;
- }
-
- IndexedValue.string(this._index, this._sValue) {
- _class = (_sValue == null || _sValue.length == 0) ? BLANK : STRING;
- }
-
- int compareTo(IndexedValue other) {
- if (_class < other._class) {
- return -1;
- } else if (_class > other._class) {
- return 1;
- }
-
- if (_class == NUMBER) {
- return _dValue < other._dValue ? -1 : (_dValue > other._dValue ? 1 : 0);
- } else if (_class == STRING) {
- return StringUtils.compare(_sValue, other._sValue);
- }
- // All blanks are equal
- return 0;
- }
-}
« no previous file with comments | « samples/total/client/IdGenerator.dart ('k') | samples/total/client/InnerMenuView.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698