You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2013/10/05 01:45:53 UTC
svn commit: r1529349 [5/44] - in /pivot/trunk:
charts/src/org/apache/pivot/charts/
charts/src/org/apache/pivot/charts/skin/ core/src/org/apache/pivot/beans/
core/src/org/apache/pivot/collections/
core/src/org/apache/pivot/collections/adapter/ core/src/...
Modified: pivot/trunk/core/src/org/apache/pivot/sql/ResultList.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/sql/ResultList.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/sql/ResultList.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/sql/ResultList.java Fri Oct 4 23:45:40 2013
@@ -23,8 +23,8 @@ import java.util.Date;
import java.util.Iterator;
import java.util.NoSuchElementException;
-import org.apache.pivot.collections.ArrayList;
import org.apache.pivot.collections.ArrayAdapter;
+import org.apache.pivot.collections.ArrayList;
import org.apache.pivot.collections.HashMap;
import org.apache.pivot.collections.List;
import org.apache.pivot.collections.ListListener;
@@ -33,267 +33,248 @@ import org.apache.pivot.collections.Sequ
import org.apache.pivot.util.ListenerList;
/**
-* Implementation of the {@link List} interface that is backed by a
-* instance of {@link java.sql.ResultSet}.
-* <p>
-* Note that this list is not suitable for random access and can only be
-* navigated via an iterator.
-*/
+ * Implementation of the {@link List} interface that is backed by a instance of
+ * {@link java.sql.ResultSet}. <p> Note that this list is not suitable for
+ * random access and can only be navigated via an iterator.
+ */
public class ResultList implements List<Map<String, Object>> {
- /**
- * Class that maps a result set column to a map key/value pair.
- */
- public static final class Field {
- /**
- * The source column name.
- */
- public final String columnName;
-
- /**
- * The name of the map key. If <tt>null</tt>, the column name will be used.
- */
- public final String key;
-
- /**
- * The type of the map value. If <tt>null</tt>, the default SQL type will be used.
- */
- public final Class<?> type;
-
- public Field(String columnName) {
- this(columnName, null, null);
- }
-
- public Field(String columnName, String key) {
- this(columnName, key, null);
- }
-
- public Field(String columnName, String key, Class<?> type) {
- if (columnName == null) {
- throw new IllegalArgumentException();
- }
-
- if (!(type == null
- || type == Boolean.class
- || type == Boolean.TYPE
- || type == Byte.class
- || type == Byte.TYPE
- || type == Short.class
- || type == Short.TYPE
- || type == Integer.class
- || type == Integer.TYPE
- || type == Long.class
- || type == Long.TYPE
- || type == Float.class
- || type == Float.TYPE
- || type == Double.class
- || type == Double.TYPE
- || type == Date.class
- || type == String.class)) {
- throw new IllegalArgumentException(type.getName() + " is not a supported type.");
- }
-
- this.columnName = columnName;
- this.key = key;
- this.type = type;
- }
- }
-
- private class ResultListItemIterator implements Iterator<Map<String, Object>> {
- private boolean hasNext = true;
- private boolean moveNext = true;
-
- @Override
- public boolean hasNext() {
- if (hasNext
- && moveNext) {
- try {
- hasNext = resultSet.next();
- moveNext = false;
- } catch (SQLException exception) {
- throw new RuntimeException(exception);
- }
- }
-
- return hasNext;
- }
-
- @Override
- public Map<String, Object> next() {
- if (!hasNext) {
- throw new NoSuchElementException();
- }
-
- HashMap<String, Object> item = new HashMap<>();
-
- try {
- for (Field field : fields) {
- Object value;
-
- if (field.type == Boolean.class
- || field.type == Boolean.TYPE) {
- value = resultSet.getBoolean(field.columnName);
- } else if (field.type == Byte.class
- || field.type == Byte.TYPE) {
- value = resultSet.getByte(field.columnName);
- } else if (field.type == Short.class
- || field.type == Short.TYPE) {
- value = resultSet.getShort(field.columnName);
- } else if (field.type == Integer.class
- || field.type == Integer.TYPE) {
- value = resultSet.getInt(field.columnName);
- } else if (field.type == Long.class
- || field.type == Long.TYPE) {
- value = resultSet.getLong(field.columnName);
- } else if (field.type == Float.class
- || field.type == Float.TYPE) {
- value = resultSet.getFloat(field.columnName);
- } else if (field.type == Double.class
- || field.type == Double.TYPE) {
- value = resultSet.getDouble(field.columnName);
- } else if (field.type == String.class) {
- value = resultSet.getString(field.columnName);
- } else if (field.type == Date.class) {
- value = resultSet.getDate(field.columnName);
- } else {
- value = resultSet.getObject(field.columnName);
- }
-
- if (resultSet.wasNull()) {
- value = null;
- }
-
- if (value != null || includeNullValues) {
- item.put((field.key == null) ? field.columnName : field.key, value);
- }
- }
- } catch (SQLException exception) {
- throw new RuntimeException(exception);
- }
-
- moveNext = true;
-
- return item;
- }
-
- @Override
- public void remove() {
- throw new UnsupportedOperationException();
- }
- }
-
- private ResultSet resultSet;
- private ArrayList<Field> fields = new ArrayList<>();
- private boolean includeNullValues = false;
-
- private ListListenerList<Map<String, Object>> listListeners = new ListListenerList<>();
-
- public ResultList(ResultSet resultSet) {
- if (resultSet == null) {
- throw new IllegalArgumentException();
- }
-
- this.resultSet = resultSet;
- }
-
- public ResultSet getResultSet() {
- return resultSet;
- }
-
- public Sequence<Field> getFields() {
- return fields;
- }
-
- public void setFields(Sequence<Field> fields) {
- if (fields == null) {
- throw new IllegalArgumentException();
- }
-
- this.fields = new ArrayList<>(fields);
- }
-
- public void setFields(Field... fields) {
- if (fields == null) {
- throw new IllegalArgumentException();
- }
-
- setFields(new ArrayAdapter<>(fields));
- }
-
- public boolean getIncludeNullValues() {
- return includeNullValues;
- }
-
- public void setIncludeNullValues(boolean includeNullValues) {
- this.includeNullValues = includeNullValues;
- }
-
- @Override
- public int add(Map<String, Object> item) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void insert(Map<String, Object> item, int index) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Map<String, Object> update(int index, Map<String, Object> item) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public int remove(Map<String, Object> item) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Sequence<Map<String, Object>> remove(int index, int count) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void clear() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Map<String, Object> get(int index) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public int indexOf(Map<String, Object> item) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean isEmpty() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public int getLength() {
- return -1;
- }
-
- @Override
- public Comparator<Map<String, Object>> getComparator() {
- return null;
- }
-
- @Override
- public void setComparator(Comparator<Map<String, Object>> comparator) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Iterator<Map<String, Object>> iterator() {
- return new ResultListItemIterator();
- }
-
- @Override
- public ListenerList<ListListener<Map<String, Object>>> getListListeners() {
- return listListeners;
- }
+ /**
+ * Class that maps a result set column to a map key/value pair.
+ */
+ public static final class Field {
+ /**
+ * The source column name.
+ */
+ public final String columnName;
+
+ /**
+ * The name of the map key. If <tt>null</tt>, the column name will be
+ * used.
+ */
+ public final String key;
+
+ /**
+ * The type of the map value. If <tt>null</tt>, the default SQL type
+ * will be used.
+ */
+ public final Class<?> type;
+
+ public Field(String columnName) {
+ this(columnName, null, null);
+ }
+
+ public Field(String columnName, String key) {
+ this(columnName, key, null);
+ }
+
+ public Field(String columnName, String key, Class<?> type) {
+ if (columnName == null) {
+ throw new IllegalArgumentException();
+ }
+
+ if (!(type == null || type == Boolean.class || type == Boolean.TYPE
+ || type == Byte.class || type == Byte.TYPE || type == Short.class
+ || type == Short.TYPE || type == Integer.class || type == Integer.TYPE
+ || type == Long.class || type == Long.TYPE || type == Float.class
+ || type == Float.TYPE || type == Double.class || type == Double.TYPE
+ || type == Date.class || type == String.class)) {
+ throw new IllegalArgumentException(type.getName() + " is not a supported type.");
+ }
+
+ this.columnName = columnName;
+ this.key = key;
+ this.type = type;
+ }
+ }
+
+ private class ResultListItemIterator implements Iterator<Map<String, Object>> {
+ private boolean hasNext = true;
+ private boolean moveNext = true;
+
+ @Override
+ public boolean hasNext() {
+ if (hasNext && moveNext) {
+ try {
+ hasNext = resultSet.next();
+ moveNext = false;
+ } catch (SQLException exception) {
+ throw new RuntimeException(exception);
+ }
+ }
+
+ return hasNext;
+ }
+
+ @Override
+ public Map<String, Object> next() {
+ if (!hasNext) {
+ throw new NoSuchElementException();
+ }
+
+ HashMap<String, Object> item = new HashMap<>();
+
+ try {
+ for (Field field : fields) {
+ Object value;
+
+ if (field.type == Boolean.class || field.type == Boolean.TYPE) {
+ value = resultSet.getBoolean(field.columnName);
+ } else if (field.type == Byte.class || field.type == Byte.TYPE) {
+ value = resultSet.getByte(field.columnName);
+ } else if (field.type == Short.class || field.type == Short.TYPE) {
+ value = resultSet.getShort(field.columnName);
+ } else if (field.type == Integer.class || field.type == Integer.TYPE) {
+ value = resultSet.getInt(field.columnName);
+ } else if (field.type == Long.class || field.type == Long.TYPE) {
+ value = resultSet.getLong(field.columnName);
+ } else if (field.type == Float.class || field.type == Float.TYPE) {
+ value = resultSet.getFloat(field.columnName);
+ } else if (field.type == Double.class || field.type == Double.TYPE) {
+ value = resultSet.getDouble(field.columnName);
+ } else if (field.type == String.class) {
+ value = resultSet.getString(field.columnName);
+ } else if (field.type == Date.class) {
+ value = resultSet.getDate(field.columnName);
+ } else {
+ value = resultSet.getObject(field.columnName);
+ }
+
+ if (resultSet.wasNull()) {
+ value = null;
+ }
+
+ if (value != null || includeNullValues) {
+ item.put((field.key == null) ? field.columnName : field.key, value);
+ }
+ }
+ } catch (SQLException exception) {
+ throw new RuntimeException(exception);
+ }
+
+ moveNext = true;
+
+ return item;
+ }
+
+ @Override
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+ private ResultSet resultSet;
+ private ArrayList<Field> fields = new ArrayList<>();
+ private boolean includeNullValues = false;
+
+ private ListListenerList<Map<String, Object>> listListeners = new ListListenerList<>();
+
+ public ResultList(ResultSet resultSet) {
+ if (resultSet == null) {
+ throw new IllegalArgumentException();
+ }
+
+ this.resultSet = resultSet;
+ }
+
+ public ResultSet getResultSet() {
+ return resultSet;
+ }
+
+ public Sequence<Field> getFields() {
+ return fields;
+ }
+
+ public void setFields(Sequence<Field> fields) {
+ if (fields == null) {
+ throw new IllegalArgumentException();
+ }
+
+ this.fields = new ArrayList<>(fields);
+ }
+
+ public void setFields(Field... fields) {
+ if (fields == null) {
+ throw new IllegalArgumentException();
+ }
+
+ setFields(new ArrayAdapter<>(fields));
+ }
+
+ public boolean getIncludeNullValues() {
+ return includeNullValues;
+ }
+
+ public void setIncludeNullValues(boolean includeNullValues) {
+ this.includeNullValues = includeNullValues;
+ }
+
+ @Override
+ public int add(Map<String, Object> item) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void insert(Map<String, Object> item, int index) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, Object> update(int index, Map<String, Object> item) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public int remove(Map<String, Object> item) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Sequence<Map<String, Object>> remove(int index, int count) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void clear() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Map<String, Object> get(int index) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public int indexOf(Map<String, Object> item) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean isEmpty() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public int getLength() {
+ return -1;
+ }
+
+ @Override
+ public Comparator<Map<String, Object>> getComparator() {
+ return null;
+ }
+
+ @Override
+ public void setComparator(Comparator<Map<String, Object>> comparator) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Iterator<Map<String, Object>> iterator() {
+ return new ResultListItemIterator();
+ }
+
+ @Override
+ public ListenerList<ListListener<Map<String, Object>>> getListListeners() {
+ return listListeners;
+ }
}
Modified: pivot/trunk/core/src/org/apache/pivot/text/CharSequenceCharacterIterator.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/text/CharSequenceCharacterIterator.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/text/CharSequenceCharacterIterator.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/text/CharSequenceCharacterIterator.java Fri Oct 4 23:45:40 2013
@@ -40,7 +40,8 @@ public final class CharSequenceCharacter
this(charSequence, beginIndex, endIndex, beginIndex);
}
- public CharSequenceCharacterIterator(CharSequence charSequence, int beginIndex, int endIndex, int index) {
+ public CharSequenceCharacterIterator(CharSequence charSequence, int beginIndex, int endIndex,
+ int index) {
if (charSequence == null) {
throw new IllegalArgumentException("charSequence may not be null");
}
@@ -52,7 +53,8 @@ public final class CharSequenceCharacter
}
if (beginIndex > endIndexUpdated) {
- throw new IllegalArgumentException("beginIndex > endIndex, " + beginIndex + ">" + endIndexUpdated);
+ throw new IllegalArgumentException("beginIndex > endIndex, " + beginIndex + ">"
+ + endIndexUpdated);
}
if (beginIndex < 0) {
@@ -60,7 +62,8 @@ public final class CharSequenceCharacter
}
if (endIndexUpdated > charSequence.length()) {
- throw new IndexOutOfBoundsException("endIndex > char sequence length, " + endIndexUpdated + ">" + charSequence.length());
+ throw new IndexOutOfBoundsException("endIndex > char sequence length, "
+ + endIndexUpdated + ">" + charSequence.length());
}
if (index < beginIndex) {
@@ -68,7 +71,8 @@ public final class CharSequenceCharacter
}
if (index > endIndexUpdated) {
- throw new IndexOutOfBoundsException("(index > endIndex, " + index + ">" + endIndexUpdated);
+ throw new IndexOutOfBoundsException("(index > endIndex, " + index + ">"
+ + endIndexUpdated);
}
this.charSequence = charSequence;
@@ -120,8 +124,7 @@ public final class CharSequenceCharacter
@Override
public char setIndex(int index) {
- if (index < beginIndex
- || index > endIndex) {
+ if (index < beginIndex || index > endIndex) {
throw new IndexOutOfBoundsException();
}
Modified: pivot/trunk/core/src/org/apache/pivot/text/FileSizeFormat.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/text/FileSizeFormat.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/text/FileSizeFormat.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/text/FileSizeFormat.java Fri Oct 4 23:45:40 2013
@@ -29,7 +29,7 @@ public class FileSizeFormat extends Form
private static final long serialVersionUID = 9126510513247641698L;
public static final int KILOBYTE = 1024;
- public static final String[] ABBREVIATIONS = {"K", "M", "G", "T", "P", "E", "Z", "Y"};
+ public static final String[] ABBREVIATIONS = { "K", "M", "G", "T", "P", "E", "Z", "Y" };
private static final FileSizeFormat FILE_SIZE_FORMAT = new FileSizeFormat();
@@ -38,24 +38,17 @@ public class FileSizeFormat extends Form
/**
* Formats a file size.
- *
- * @param object
- * A <tt>Number</tt> containing the length of the file, in bytes. May be
- * negative to indicate an unknown file size.
- *
- * @param stringBuffer
- * The string buffer to which the formatted output will be appended.
- *
- * @param fieldPosition
- * Not used.
- *
- * @return
- * The original string buffer, with the formatted value appended.
+ *
+ * @param object A <tt>Number</tt> containing the length of the file, in
+ * bytes. May be negative to indicate an unknown file size.
+ * @param stringBuffer The string buffer to which the formatted output will
+ * be appended.
+ * @param fieldPosition Not used.
+ * @return The original string buffer, with the formatted value appended.
*/
@Override
- public StringBuffer format(Object object, StringBuffer stringBuffer,
- FieldPosition fieldPosition) {
- Number number = (Number)object;
+ public StringBuffer format(Object object, StringBuffer stringBuffer, FieldPosition fieldPosition) {
+ Number number = (Number) object;
long length = number.longValue();
@@ -69,8 +62,7 @@ public class FileSizeFormat extends Form
} while (size > KILOBYTE);
NumberFormat numberFormat = NumberFormat.getNumberInstance();
- if (i == 0
- && size > 1) {
+ if (i == 0 && size > 1) {
numberFormat.setMaximumFractionDigits(0);
} else {
numberFormat.setMaximumFractionDigits(1);
@@ -84,7 +76,7 @@ public class FileSizeFormat extends Form
/**
* This method is not supported.
- *
+ *
* @throws UnsupportedOperationException
*/
@Override
@@ -94,9 +86,8 @@ public class FileSizeFormat extends Form
/**
* Returns a shared file size format instance.
- *
- * @return
- * A shared file format size instance.
+ *
+ * @return A shared file format size instance.
*/
public static FileSizeFormat getInstance() {
return FILE_SIZE_FORMAT;
Modified: pivot/trunk/core/src/org/apache/pivot/util/Base64.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Base64.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Base64.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Base64.java Fri Oct 4 23:45:40 2013
@@ -17,8 +17,8 @@
package org.apache.pivot.util;
/**
- * Implements the "base64" binary encoding scheme as defined by
- * <a href="http://tools.ietf.org/html/rfc2045">RFC 2045</a>.
+ * Implements the "base64" binary encoding scheme as defined by <a
+ * href="http://tools.ietf.org/html/rfc2045">RFC 2045</a>.
*/
public final class Base64 {
private static final char[] lookup = new char[64];
@@ -28,15 +28,15 @@ public final class Base64 {
// Populate the lookup array
for (int i = 0; i < 26; i++) {
- lookup[i] = (char)('A' + i);
+ lookup[i] = (char) ('A' + i);
}
for (int i = 26, j = 0; i < 52; i++, j++) {
- lookup[i] = (char)('a' + j);
+ lookup[i] = (char) ('a' + j);
}
for (int i = 52, j = 0; i < 62; i++, j++) {
- lookup[i] = (char)('0' + j);
+ lookup[i] = (char) ('0' + j);
}
lookup[62] = '+';
@@ -49,15 +49,15 @@ public final class Base64 {
}
for (int i = 'Z'; i >= 'A'; i--) {
- reverseLookup[i] = (byte)(i - 'A');
+ reverseLookup[i] = (byte) (i - 'A');
}
for (int i = 'z'; i >= 'a'; i--) {
- reverseLookup[i] = (byte)(i - 'a' + 26);
+ reverseLookup[i] = (byte) (i - 'a' + 26);
}
for (int i = '9'; i >= '0'; i--) {
- reverseLookup[i] = (byte)(i - '0' + 52);
+ reverseLookup[i] = (byte) (i - '0' + 52);
}
reverseLookup['+'] = 62;
@@ -73,14 +73,13 @@ public final class Base64 {
/**
* Encodes the specified data into a base64 string.
- *
- * @param bytes
- * The unencoded raw data.
+ *
+ * @param bytes The unencoded raw data.
*/
public static String encode(byte[] bytes) {
StringBuilder buf = new StringBuilder(4 * (bytes.length / 3 + 1));
- for (int i = 0, n = bytes.length; i < n; ) {
+ for (int i = 0, n = bytes.length; i < n;) {
byte byte0 = bytes[i++];
byte byte1 = (i++ < n) ? bytes[i - 1] : 0;
byte byte2 = (i++ < n) ? bytes[i - 1] : 0;
@@ -102,9 +101,8 @@ public final class Base64 {
/**
* Decodes the specified base64 string back into its raw data.
- *
- * @param encoded
- * The base64 encoded string.
+ *
+ * @param encoded The base64 encoded string.
*/
public static byte[] decode(String encoded) {
int padding = 0;
@@ -123,7 +121,7 @@ public final class Base64 {
word += reverseLookup[encoded.charAt(i + 3)];
for (int j = 0; j < 3 && index + j < length; j++) {
- bytes[index + j] = (byte)(word >> (8 * (2 - j)));
+ bytes[index + j] = (byte) (word >> (8 * (2 - j)));
}
index += 3;
Modified: pivot/trunk/core/src/org/apache/pivot/util/CalendarDate.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/CalendarDate.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/CalendarDate.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/CalendarDate.java Fri Oct 4 23:45:40 2013
@@ -85,15 +85,15 @@ public final class CalendarDate implemen
}
if (startRange instanceof String) {
- this.start = CalendarDate.decode((String)startRange);
+ this.start = CalendarDate.decode((String) startRange);
} else {
- this.start = (CalendarDate)startRange;
+ this.start = (CalendarDate) startRange;
}
if (endRange instanceof String) {
- this.end = CalendarDate.decode((String)endRange);
+ this.end = CalendarDate.decode((String) endRange);
} else {
- this.end = (CalendarDate)endRange;
+ this.end = (CalendarDate) endRange;
}
}
@@ -110,11 +110,9 @@ public final class CalendarDate implemen
boolean contains;
if (this.start.compareTo(this.end) < 0) {
- contains = (this.start.compareTo(normalizedRange.start) <= 0
- && this.end.compareTo(normalizedRange.end) >= 0);
+ contains = (this.start.compareTo(normalizedRange.start) <= 0 && this.end.compareTo(normalizedRange.end) >= 0);
} else {
- contains = (this.end.compareTo(normalizedRange.start) <= 0
- && this.start.compareTo(normalizedRange.end) >= 0);
+ contains = (this.end.compareTo(normalizedRange.start) <= 0 && this.start.compareTo(normalizedRange.end) >= 0);
}
return contains;
@@ -127,11 +125,9 @@ public final class CalendarDate implemen
boolean contains;
if (this.start.compareTo(this.end) < 0) {
- contains = (this.start.compareTo(calendarDate) <= 0
- && this.end.compareTo(calendarDate) >= 0);
+ contains = (this.start.compareTo(calendarDate) <= 0 && this.end.compareTo(calendarDate) >= 0);
} else {
- contains = (this.end.compareTo(calendarDate) <= 0
- && this.start.compareTo(calendarDate) >= 0);
+ contains = (this.end.compareTo(calendarDate) <= 0 && this.start.compareTo(calendarDate) >= 0);
}
return contains;
@@ -146,11 +142,9 @@ public final class CalendarDate implemen
boolean intersects;
if (this.start.compareTo(this.end) < 0) {
- intersects = (this.start.compareTo(normalizedRange.end) <= 0
- && this.end.compareTo(normalizedRange.start) >= 0);
+ intersects = (this.start.compareTo(normalizedRange.end) <= 0 && this.end.compareTo(normalizedRange.start) >= 0);
} else {
- intersects = (this.end.compareTo(normalizedRange.end) <= 0
- && this.start.compareTo(normalizedRange.start) >= 0);
+ intersects = (this.end.compareTo(normalizedRange.end) <= 0 && this.start.compareTo(normalizedRange.start) >= 0);
}
return intersects;
@@ -197,9 +191,7 @@ public final class CalendarDate implemen
*/
public final int day;
- private static final int[] MONTH_LENGTHS = {
- 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
- };
+ private static final int[] MONTH_LENGTHS = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
private static final int GREGORIAN_CUTOVER_YEAR = 1582;
private static final Pattern PATTERN = Pattern.compile("^(\\d{4})-(\\d{2})-(\\d{2})$");
@@ -213,12 +205,11 @@ public final class CalendarDate implemen
}
/**
- * Creates a new <tt>CalendarDate</tt> representing the day contained in
- * the specified Gregorian calendar (assuming the default locale and the
- * default timezone).
- *
- * @param calendar
- * The calendar containing the year, month, and day fields.
+ * Creates a new <tt>CalendarDate</tt> representing the day contained in the
+ * specified Gregorian calendar (assuming the default locale and the default
+ * timezone).
+ *
+ * @param calendar The calendar containing the year, month, and day fields.
*/
public CalendarDate(GregorianCalendar calendar) {
this(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH),
@@ -228,15 +219,10 @@ public final class CalendarDate implemen
/**
* Creates a new <tt>CalendarDate</tt> representing the specified year,
* month, and day of month.
- *
- * @param year
- * The year field. (e.g. <tt>2008</tt>)
- *
- * @param month
- * The month field, 0-based. (e.g. <tt>2</tt> for March)
- *
- * @param day
- * The day of the month, 0-based. (e.g. <tt>14</tt> for the 15th)
+ *
+ * @param year The year field. (e.g. <tt>2008</tt>)
+ * @param month The month field, 0-based. (e.g. <tt>2</tt> for March)
+ * @param day The day of the month, 0-based. (e.g. <tt>14</tt> for the 15th)
*/
public CalendarDate(int year, int month, int day) {
if (year <= GREGORIAN_CUTOVER_YEAR || year > 9999) {
@@ -266,20 +252,14 @@ public final class CalendarDate implemen
/**
* Adds the specified number of days to this calendar date and returns the
* resulting calendar date. The number of days may be negative, in which
- * case the result will be a date before this calendar date.
- * <p>
- * More formally, it is defined that given calendar dates <tt>c1</tt> and
- * <tt>c2</tt>, the following will return <tt>true</tt>:
- * <pre>
- * c1.add(c2.subtract(c1)).equals(c2);
- * </pre>
- *
- * @param days
- * The number of days to add to (or subtract from if negative) this
- * calendar date.
- *
- * @return
- * The resulting calendar date.
+ * case the result will be a date before this calendar date. <p> More
+ * formally, it is defined that given calendar dates <tt>c1</tt> and
+ * <tt>c2</tt>, the following will return <tt>true</tt>: <pre>
+ * c1.add(c2.subtract(c1)).equals(c2); </pre>
+ *
+ * @param days The number of days to add to (or subtract from if negative)
+ * this calendar date.
+ * @return The resulting calendar date.
*/
public CalendarDate add(int days) {
GregorianCalendar calendar = toCalendar();
@@ -289,23 +269,17 @@ public final class CalendarDate implemen
/**
* Gets the number of days in between this calendar date and the specified
- * calendar date. If this calendar date represents a day after the
- * specified calendar date, the difference will be positive. If this
- * calendar date represents a day before the specified calendar date, the
- * difference will be negative. If the two calendar dates represent the
- * same day, the difference will be zero.
- * <p>
- * More formally, it is defined that given calendar dates <tt>c1</tt> and
- * <tt>c2</tt>, the following will return <tt>true</tt>:
- * <pre>
- * c1.add(c2.subtract(c1)).equals(c2);
- * </pre>
- *
- * @param calendarDate
- * The calendar date to subtract from this calendar date.
- *
- * @return
- * The number of days in between this calendar date and
+ * calendar date. If this calendar date represents a day after the specified
+ * calendar date, the difference will be positive. If this calendar date
+ * represents a day before the specified calendar date, the difference will
+ * be negative. If the two calendar dates represent the same day, the
+ * difference will be zero. <p> More formally, it is defined that given
+ * calendar dates <tt>c1</tt> and <tt>c2</tt>, the following will return
+ * <tt>true</tt>: <pre> c1.add(c2.subtract(c1)).equals(c2); </pre>
+ *
+ * @param calendarDate The calendar date to subtract from this calendar
+ * date.
+ * @return The number of days in between this calendar date and
* <tt>calendarDate</tt>.
*/
public int subtract(CalendarDate calendarDate) {
@@ -315,7 +289,7 @@ public final class CalendarDate implemen
long t1 = c1.getTimeInMillis();
long t2 = c2.getTimeInMillis();
- return (int)((t1 - t2) / (1000l * 60 * 60 * 24));
+ return (int) ((t1 - t2) / (1000l * 60 * 60 * 24));
}
/**
@@ -323,9 +297,8 @@ public final class CalendarDate implemen
* <tt>GregorianCalendar</tt>, with the <tt>year</tt>, <tt>month</tt>, and
* <tt>dayOfMonth</tt> fields set in the default time zone with the default
* locale.
- *
- * @return
- * This calendar date as a <tt>GregorianCalendar</tt>.
+ *
+ * @return This calendar date as a <tt>GregorianCalendar</tt>.
*/
public GregorianCalendar toCalendar() {
return toCalendar(new Time(0, 0, 0));
@@ -336,12 +309,9 @@ public final class CalendarDate implemen
* <tt>GregorianCalendar</tt>, with the <tt>year</tt>, <tt>month</tt>, and
* <tt>dayOfMonth</tt> fields set in the default time zone with the default
* locale.
- *
- * @param time
- * The time of day.
- *
- * @return
- * This calendar date as a <tt>GregorianCalendar</tt>.
+ *
+ * @param time The time of day.
+ * @return This calendar date as a <tt>GregorianCalendar</tt>.
*/
public GregorianCalendar toCalendar(Time time) {
GregorianCalendar calendar = new GregorianCalendar(this.year, this.month, this.day + 1,
@@ -353,13 +323,10 @@ public final class CalendarDate implemen
/**
* Compares this calendar date with another calendar date.
- *
- * @param calendarDate
- * The calendar date against which to compare.
- *
- * @return
- * A negative number, zero, or a positive number if the specified calendar
- * date is less than, equal to, or greater than this calendar date,
+ *
+ * @param calendarDate The calendar date against which to compare.
+ * @return A negative number, zero, or a positive number if the specified
+ * calendar date is less than, equal to, or greater than this calendar date,
* respectively.
*/
@Override
@@ -378,19 +345,16 @@ public final class CalendarDate implemen
}
/**
- * Indicates whether some other object is "equal to" this one.
- * This is the case if the object is a calendar date that represents the
- * same day as this one.
- *
- * @param o
- * Reference to the object against which to compare.
+ * Indicates whether some other object is "equal to" this one. This is the
+ * case if the object is a calendar date that represents the same day as
+ * this one.
+ *
+ * @param o Reference to the object against which to compare.
*/
@Override
public boolean equals(Object o) {
- return (o instanceof CalendarDate
- && ((CalendarDate)o).year == this.year
- && ((CalendarDate)o).month == this.month
- && ((CalendarDate)o).day == this.day);
+ return (o instanceof CalendarDate && ((CalendarDate) o).year == this.year
+ && ((CalendarDate) o).month == this.month && ((CalendarDate) o).day == this.day);
}
/**
@@ -432,11 +396,11 @@ public final class CalendarDate implemen
/**
* Creates a new date representing the specified date string. The date
- * string must be in the <tt>ISO 8601</tt> "calendar date" format,
- * which is <tt>[YYYY]-[MM]-[DD]</tt>.
- *
- * @param value
- * A string in the form of <tt>[YYYY]-[MM]-[DD]</tt> (e.g. 2008-07-23).
+ * string must be in the <tt>ISO 8601</tt> "calendar date" format, which is
+ * <tt>[YYYY]-[MM]-[DD]</tt>.
+ *
+ * @param value A string in the form of <tt>[YYYY]-[MM]-[DD]</tt> (e.g.
+ * 2008-07-23).
*/
public static CalendarDate decode(String value) {
Matcher matcher = PATTERN.matcher(value);
Modified: pivot/trunk/core/src/org/apache/pivot/util/Console.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Console.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Console.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Console.java Fri Oct 4 23:45:40 2013
@@ -19,7 +19,7 @@ package org.apache.pivot.util;
/**
* Utility class for a simple log to the console, for example from scripts.
*/
-public class Console {
+public class Console {
private Console() {
}
Modified: pivot/trunk/core/src/org/apache/pivot/util/Filter.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Filter.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Filter.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Filter.java Fri Oct 4 23:45:40 2013
@@ -22,12 +22,10 @@ package org.apache.pivot.util;
public interface Filter<T> {
/**
* Determines item inclusion.
- *
- * @param item
- * The item to test for inclusion.
- *
- * @return
- * <tt>true</tt> if the item should be included; <tt>false</tt>, otherwise.
+ *
+ * @param item The item to test for inclusion.
+ * @return <tt>true</tt> if the item should be included; <tt>false</tt>,
+ * otherwise.
*/
public boolean include(T item);
}
Modified: pivot/trunk/core/src/org/apache/pivot/util/ListenerList.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/ListenerList.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/ListenerList.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/ListenerList.java Fri Oct 4 23:45:40 2013
@@ -21,12 +21,10 @@ import java.util.Iterator;
import java.util.NoSuchElementException;
/**
- * Abstract base class for listener lists.
- * <p>
- * NOTE This class is not inherently thread safe. Subclasses that require
- * thread-safe access should synchronize method access appropriately. Callers
- * must manually synchronize on the listener list instance to ensure thread
- * safety during iteration.
+ * Abstract base class for listener lists. <p> NOTE This class is not inherently
+ * thread safe. Subclasses that require thread-safe access should synchronize
+ * method access appropriately. Callers must manually synchronize on the
+ * listener list instance to ensure thread safety during iteration.
*/
public abstract class ListenerList<T> implements Iterable<T> {
@@ -63,14 +61,14 @@ public abstract class ListenerList<T> im
// The current array of items (some of which are null)
// All non-null objects are at the beginning of the array
// and the array is reorganized on "remove"
- @SuppressWarnings({"unchecked"})
- private T[] list = (T[])new Object[DEFAULT_SIZE];
+ @SuppressWarnings({ "unchecked" })
+ private T[] list = (T[]) new Object[DEFAULT_SIZE];
// The current length of the active list
private int last = 0;
/**
* Adds a listener to the list, if it has not previously been added.
- *
+ *
* @param listener
*/
public void add(T listener) {
@@ -89,7 +87,7 @@ public abstract class ListenerList<T> im
/**
* Removes a listener from the list, if it has previously been added.
- *
+ *
* @param listener
*/
public void remove(T listener) {
@@ -123,11 +121,9 @@ public abstract class ListenerList<T> im
/**
* Tests the existence of a listener in the list.
- *
+ *
* @param listener
- *
- * @return
- * <tt>true</tt> if the listener exists in the list; <tt>false</tt>,
+ * @return <tt>true</tt> if the listener exists in the list; <tt>false</tt>,
* otherwise.
*/
public boolean contains(T listener) {
@@ -136,9 +132,8 @@ public abstract class ListenerList<T> im
/**
* Tests the emptiness of the list.
- *
- * @return
- * <tt>true</tt> if the list contains no listeners; <tt>false</tt>,
+ *
+ * @return <tt>true</tt> if the list contains no listeners; <tt>false</tt>,
* otherwise.
*/
public boolean isEmpty() {
@@ -147,9 +142,8 @@ public abstract class ListenerList<T> im
/**
* Get the number of elements in the list.
- *
- * @return
- * the number of elements.
+ *
+ * @return the number of elements.
*/
public int getLength() {
return last;
Modified: pivot/trunk/core/src/org/apache/pivot/util/MessageBus.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/MessageBus.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/MessageBus.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/MessageBus.java Fri Oct 4 23:45:40 2013
@@ -22,12 +22,11 @@ import org.apache.pivot.collections.Hash
* Provides support for basic intra-application message passing.
*/
public class MessageBus {
- private static HashMap<Class<?>, ListenerList<MessageBusListener<?>>> messageTopics
- = new HashMap<>();
+ private static HashMap<Class<?>, ListenerList<MessageBusListener<?>>> messageTopics = new HashMap<>();
/**
* Subscribes a listener to a message topic.
- *
+ *
* @param topic
* @param messageListener
*/
@@ -46,7 +45,7 @@ public class MessageBus {
/**
* Unsubscribe a listener from a message topic.
- *
+ *
* @param topic
* @param messageListener
*/
@@ -65,7 +64,7 @@ public class MessageBus {
/**
* Sends a message to subscribed topic listeners.
- *
+ *
* @param message
*/
@SuppressWarnings("unchecked")
@@ -75,7 +74,7 @@ public class MessageBus {
if (topicListeners != null) {
for (MessageBusListener<?> listener : topicListeners) {
- ((MessageBusListener<T>)listener).messageSent(message);
+ ((MessageBusListener<T>) listener).messageSent(message);
}
}
}
Modified: pivot/trunk/core/src/org/apache/pivot/util/MessageBusListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/MessageBusListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/MessageBusListener.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/MessageBusListener.java Fri Oct 4 23:45:40 2013
@@ -21,8 +21,9 @@ package org.apache.pivot.util;
*/
public interface MessageBusListener<T> {
/**
- * Called when a message has been sent via {@link MessageBus#sendMessage(Object)}.
- *
+ * Called when a message has been sent via
+ * {@link MessageBus#sendMessage(Object)}.
+ *
* @param message
*/
public void messageSent(T message);
Modified: pivot/trunk/core/src/org/apache/pivot/util/Resources.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Resources.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Resources.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Resources.java Fri Oct 4 23:45:40 2013
@@ -45,13 +45,11 @@ public class Resources implements Dictio
this(null, baseName, Locale.getDefault(), Charset.forName(DEFAULT_CHARSET_NAME));
}
- public Resources(Resources parent, String baseName) throws IOException,
- SerializationException {
+ public Resources(Resources parent, String baseName) throws IOException, SerializationException {
this(parent, baseName, Locale.getDefault(), Charset.forName(DEFAULT_CHARSET_NAME));
}
- public Resources(String baseName, Locale locale) throws IOException,
- SerializationException {
+ public Resources(String baseName, Locale locale) throws IOException, SerializationException {
this(null, baseName, locale, Charset.forName(DEFAULT_CHARSET_NAME));
}
@@ -60,8 +58,7 @@ public class Resources implements Dictio
this(parent, baseName, locale, Charset.forName(DEFAULT_CHARSET_NAME));
}
- public Resources(String baseName, Charset charset) throws IOException,
- SerializationException {
+ public Resources(String baseName, Charset charset) throws IOException, SerializationException {
this(null, baseName, Locale.getDefault(), charset);
}
@@ -72,31 +69,19 @@ public class Resources implements Dictio
/**
* Creates a new resource bundle.
- *
- * @param parent
- * The parent resource defer to if a resource cannot be found in this
- * instance or null.
- *
- * @param baseName
- * The base name of this resource as a fully qualified class name.
- *
- * @param locale
- * The locale to use when reading this resource.
- *
- * @param charset
- * The character encoding to use when reading this resource.
- *
- * @throws IOException
- * If there is a problem when reading the resource.
- *
- * @throws SerializationException
- * If there is a problem deserializing the resource from its JSON format.
- *
- * @throws IllegalArgumentException
- * If baseName or locale or charset is null.
- *
- * @throws MissingResourceException
- * If no resource for the specified base name can be found.
+ *
+ * @param parent The parent resource defer to if a resource cannot be found
+ * in this instance or null.
+ * @param baseName The base name of this resource as a fully qualified class
+ * name.
+ * @param locale The locale to use when reading this resource.
+ * @param charset The character encoding to use when reading this resource.
+ * @throws IOException If there is a problem when reading the resource.
+ * @throws SerializationException If there is a problem deserializing the
+ * resource from its JSON format.
+ * @throws IllegalArgumentException If baseName or locale or charset is null.
+ * @throws MissingResourceException If no resource for the specified base
+ * name can be found.
*/
public Resources(Resources parent, String baseName, Locale locale, Charset charset)
throws IOException, SerializationException {
@@ -132,7 +117,8 @@ public class Resources implements Dictio
}
// Try to find resource for the entire locale (e.g. resourceName_en_GB)
- overrideMap = readJSONResource(resourceName + "_" + locale.toString() + "." + JSONSerializer.JSON_EXTENSION);
+ overrideMap = readJSONResource(resourceName + "_" + locale.toString() + "."
+ + JSONSerializer.JSON_EXTENSION);
if (overrideMap != null) {
if (this.resourceMap == null) {
this.resourceMap = overrideMap;
@@ -142,8 +128,8 @@ public class Resources implements Dictio
}
if (this.resourceMap == null) {
- throw new MissingResourceException("Can't find resource for base name "
- + baseName + ", locale " + locale, baseName, "");
+ throw new MissingResourceException("Can't find resource for base name " + baseName
+ + ", locale " + locale, baseName, "");
}
}
@@ -165,8 +151,8 @@ public class Resources implements Dictio
@Override
public Object get(String key) {
- return (this.resourceMap.containsKey(key)) ?
- this.resourceMap.get(key) : (this.parent == null) ? null : this.parent.get(key);
+ return (this.resourceMap.containsKey(key)) ? this.resourceMap.get(key)
+ : (this.parent == null) ? null : this.parent.get(key);
}
@Override
@@ -182,8 +168,7 @@ public class Resources implements Dictio
@Override
public boolean containsKey(String key) {
return this.resourceMap.containsKey(key)
- || (this.parent != null
- && this.parent.containsKey(key));
+ || (this.parent != null && this.parent.containsKey(key));
}
@Override
@@ -198,9 +183,8 @@ public class Resources implements Dictio
Object source = sourceMap.get(key);
Object override = overridesMap.get(key);
- if (source instanceof Map<?, ?>
- && override instanceof Map<?, ?>) {
- applyOverrides((Map<String, Object>)source, (Map<String, Object>)override);
+ if (source instanceof Map<?, ?> && override instanceof Map<?, ?>) {
+ applyOverrides((Map<String, Object>) source, (Map<String, Object>) override);
} else {
sourceMap.put(key, overridesMap.get(key));
}
@@ -209,8 +193,8 @@ public class Resources implements Dictio
}
@SuppressWarnings("unchecked")
- private Map<String, Object> readJSONResource(String name)
- throws IOException, SerializationException {
+ private Map<String, Object> readJSONResource(String name) throws IOException,
+ SerializationException {
Map<String, Object> resourceMapFromResource = null;
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
@@ -220,7 +204,7 @@ public class Resources implements Dictio
JSONSerializer serializer = new JSONSerializer(this.charset);
try {
- resourceMapFromResource = (Map<String, Object>)serializer.readObject(inputStream);
+ resourceMapFromResource = (Map<String, Object>) serializer.readObject(inputStream);
} finally {
inputStream.close();
}
Modified: pivot/trunk/core/src/org/apache/pivot/util/Service.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Service.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Service.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Service.java Fri Oct 4 23:45:40 2013
@@ -27,16 +27,14 @@ import java.io.InputStreamReader;
public class Service {
/**
* Attempts to load a service provider.
- *
- * @param providerName
- * The name of the provider to load. The method first looks for a system
- * property with this name. The value of the property is expected to be the
- * name of a class that implements the expected provider interface.
- * <p>
- * If the system property does not exist, the method then attempts to load
- * a resource with this name from the META-INF/services directory. The
- * resource is expected to be a text file containing a single line that is
- * the name of the provider class.
+ *
+ * @param providerName The name of the provider to load. The method first
+ * looks for a system property with this name. The value of the property is
+ * expected to be the name of a class that implements the expected provider
+ * interface. <p> If the system property does not exist, the method then
+ * attempts to load a resource with this name from the META-INF/services
+ * directory. The resource is expected to be a text file containing a single
+ * line that is the name of the provider class.
*/
@SuppressWarnings("resource")
public static Object getProvider(String providerName) {
@@ -45,7 +43,7 @@ public class Service {
// First look for a system property
try {
providerClassName = System.getProperty(providerName);
- } catch(SecurityException exception) {
+ } catch (SecurityException exception) {
// No-op
}
@@ -60,11 +58,10 @@ public class Service {
try {
BufferedReader reader = null;
try {
- reader = new BufferedReader(new InputStreamReader(serviceInputStream, "UTF-8"));
+ reader = new BufferedReader(new InputStreamReader(serviceInputStream,
+ "UTF-8"));
String line = reader.readLine();
- while (line != null
- && (line.length() == 0
- || line.startsWith("#"))) {
+ while (line != null && (line.length() == 0 || line.startsWith("#"))) {
line = reader.readLine();
}
@@ -74,7 +71,7 @@ public class Service {
reader.close();
}
}
- } catch(IOException exception) {
+ } catch (IOException exception) {
// No-op
}
}
@@ -86,7 +83,7 @@ public class Service {
if (providerClassName != null) {
try {
providerClass = Class.forName(providerClassName);
- } catch(ClassNotFoundException exception) {
+ } catch (ClassNotFoundException exception) {
// The specified class could not be found
}
}
@@ -95,9 +92,9 @@ public class Service {
if (providerClass != null) {
try {
provider = providerClass.newInstance();
- } catch(InstantiationException exception) {
+ } catch (InstantiationException exception) {
// No-op
- } catch(IllegalAccessException exception) {
+ } catch (IllegalAccessException exception) {
// No-op
}
}
Modified: pivot/trunk/core/src/org/apache/pivot/util/Time.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Time.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Time.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Time.java Fri Oct 4 23:45:40 2013
@@ -83,15 +83,15 @@ public final class Time implements Compa
}
if (startRange instanceof String) {
- this.start = Time.decode((String)startRange);
+ this.start = Time.decode((String) startRange);
} else {
- this.start = (Time)startRange;
+ this.start = (Time) startRange;
}
if (endRange instanceof String) {
- this.end = Time.decode((String)endRange);
+ this.end = Time.decode((String) endRange);
} else {
- this.end = (Time)endRange;
+ this.end = (Time) endRange;
}
}
@@ -108,11 +108,9 @@ public final class Time implements Compa
boolean contains;
if (this.start.compareTo(this.end) < 0) {
- contains = (this.start.compareTo(normalizedRange.start) <= 0
- && this.end.compareTo(normalizedRange.end) >= 0);
+ contains = (this.start.compareTo(normalizedRange.start) <= 0 && this.end.compareTo(normalizedRange.end) >= 0);
} else {
- contains = (this.end.compareTo(normalizedRange.start) <= 0
- && this.start.compareTo(normalizedRange.end) >= 0);
+ contains = (this.end.compareTo(normalizedRange.start) <= 0 && this.start.compareTo(normalizedRange.end) >= 0);
}
return contains;
@@ -125,11 +123,9 @@ public final class Time implements Compa
boolean contains;
if (this.start.compareTo(this.end) < 0) {
- contains = (this.start.compareTo(time) <= 0
- && this.end.compareTo(time) >= 0);
+ contains = (this.start.compareTo(time) <= 0 && this.end.compareTo(time) >= 0);
} else {
- contains = (this.end.compareTo(time) <= 0
- && this.start.compareTo(time) >= 0);
+ contains = (this.end.compareTo(time) <= 0 && this.start.compareTo(time) >= 0);
}
return contains;
@@ -144,11 +140,9 @@ public final class Time implements Compa
boolean intersects;
if (this.start.compareTo(this.end) < 0) {
- intersects = (this.start.compareTo(normalizedRange.end) <= 0
- && this.end.compareTo(normalizedRange.start) >= 0);
+ intersects = (this.start.compareTo(normalizedRange.end) <= 0 && this.end.compareTo(normalizedRange.start) >= 0);
} else {
- intersects = (this.end.compareTo(normalizedRange.end) <= 0
- && this.start.compareTo(normalizedRange.start) >= 0);
+ intersects = (this.end.compareTo(normalizedRange.end) <= 0 && this.start.compareTo(normalizedRange.start) >= 0);
}
return intersects;
@@ -269,14 +263,11 @@ public final class Time implements Compa
/**
* Adds the specified milliseconds of days to this time and returns the
- * resulting time. The number of milliseconds may be negative, in which
- * case the result will be a time prior to this time.
- *
- * @param milliseconds
- * The number of milliseconds to add to this time.
- *
- * @return
- * The resulting time.
+ * resulting time. The number of milliseconds may be negative, in which case
+ * the result will be a time prior to this time.
+ *
+ * @param milliseconds The number of milliseconds to add to this time.
+ * @return The resulting time.
*/
public Time add(int milliseconds) {
return new Time(toMilliseconds() + milliseconds);
@@ -286,14 +277,11 @@ public final class Time implements Compa
* Gets the number of milliseconds in between this time and the specified
* time. If this time represents a time later than the specified time, the
* difference will be positive. If this time represents a time before the
- * specified time, the difference will be negative. If the two times represent
- * the same time, the difference will be zero.
- *
- * @param time
- * The time to subtract from this time.
- *
- * @return
- * The number of milliseconds in between this time and <tt>time</tt>.
+ * specified time, the difference will be negative. If the two times
+ * represent the same time, the difference will be zero.
+ *
+ * @param time The time to subtract from this time.
+ * @return The number of milliseconds in between this time and <tt>time</tt>.
*/
public int subtract(Time time) {
if (time == null) {
@@ -304,17 +292,15 @@ public final class Time implements Compa
}
/**
- * Returns the number of milliseconds since midnight represented by
- * this time.
- *
- * @return
- * The number of milliseconds since midnight represented by this time.
+ * Returns the number of milliseconds since midnight represented by this
+ * time.
+ *
+ * @return The number of milliseconds since midnight represented by this
+ * time.
*/
public int toMilliseconds() {
- return this.hour * MILLISECONDS_PER_HOUR
- + this.minute * MILLISECONDS_PER_MINUTE
- + this.second * MILLISECONDS_PER_SECOND
- + this.millisecond;
+ return this.hour * MILLISECONDS_PER_HOUR + this.minute * MILLISECONDS_PER_MINUTE
+ + this.second * MILLISECONDS_PER_SECOND + this.millisecond;
}
@Override
@@ -338,11 +324,8 @@ public final class Time implements Compa
@Override
public boolean equals(Object o) {
- return (o instanceof Time
- && ((Time)o).hour == this.hour
- && ((Time)o).minute == this.minute
- && ((Time)o).second == this.second
- && ((Time)o).millisecond == this.millisecond);
+ return (o instanceof Time && ((Time) o).hour == this.hour
+ && ((Time) o).minute == this.minute && ((Time) o).second == this.second && ((Time) o).millisecond == this.millisecond);
}
@Override
@@ -383,11 +366,10 @@ public final class Time implements Compa
/**
* Creates a new time representing the specified time string. The time
* string must be in the full <tt>ISO 8601</tt> extended "time" format,
- * which is <tt>[hh]:[mm]:[ss]</tt>. An optional millisecond suffix of
- * the form <tt>.[nnn]</tt> is also supported.
- *
- * @param value
- * A string in the form of <tt>[hh]:[mm]:[ss]</tt> or
+ * which is <tt>[hh]:[mm]:[ss]</tt>. An optional millisecond suffix of the
+ * form <tt>.[nnn]</tt> is also supported.
+ *
+ * @param value A string in the form of <tt>[hh]:[mm]:[ss]</tt> or
* <tt>[hh]:[mm]:[ss].[nnn]</tt> (e.g. 17:19:20 or 17:19:20.412).
*/
public static Time decode(String value) {
@@ -402,8 +384,8 @@ public final class Time implements Compa
int second = Integer.parseInt(matcher.group(3));
String millisecondSequence = matcher.group(4);
- int millisecond = (millisecondSequence == null) ?
- 0 : Integer.parseInt(millisecondSequence.substring(1));
+ int millisecond = (millisecondSequence == null) ? 0
+ : Integer.parseInt(millisecondSequence.substring(1));
return new Time(hour, minute, second, millisecond);
}
Modified: pivot/trunk/core/src/org/apache/pivot/util/TypeLiteral.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/TypeLiteral.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/TypeLiteral.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/TypeLiteral.java Fri Oct 4 23:45:40 2013
@@ -21,17 +21,15 @@ import java.lang.reflect.Type;
/**
* Represents a generic type {@code T}. Java doesn't yet provide a way to
- * represent generic types, so this class does. Clients create a subclass
- * of this class, which enables retrieval the type information even at runtime.
- * <p>
+ * represent generic types, so this class does. Clients create a subclass of
+ * this class, which enables retrieval the type information even at runtime. <p>
* For example, to get a reference to a generic type {@code List<String>}, you
- * create an empty anonymous inner class, like so:
- * <p>
+ * create an empty anonymous inner class, like so: <p>
* {@code Type genericType = (new TypeLiteral<List<String>>() {}).getType();}
- * <p>
- * This class is a drastically reduced derivation from
- * <a href="http://code.google.com/p/google-guice/">Google Guice</a>'s
+ * <p> This class is a drastically reduced derivation from <a
+ * href="http://code.google.com/p/google-guice/">Google Guice</a>'s
* {@code TypeLiteral} class, written by Bob Lee and Jesse Wilson.
+ *
* @param <T> note that in Tree the type parameter currently it's not used
*/
public class TypeLiteral<T> {
@@ -39,11 +37,9 @@ public class TypeLiteral<T> {
/**
* Constructs a new type literal. Derives represented class from type
- * parameter.
- * <p>
- * Clients create an empty anonymous subclass. Doing so embeds the type
- * parameter in the anonymous class's type hierarchy so we can reconstitute it
- * at runtime despite erasure.
+ * parameter. <p> Clients create an empty anonymous subclass. Doing so
+ * embeds the type parameter in the anonymous class's type hierarchy so we
+ * can reconstitute it at runtime despite erasure.
*/
protected TypeLiteral() {
Type genericSuperclass = getClass().getGenericSuperclass();
@@ -51,7 +47,7 @@ public class TypeLiteral<T> {
throw new RuntimeException("Missing type parameter.");
}
- ParameterizedType parameterizedType = (ParameterizedType)genericSuperclass;
+ ParameterizedType parameterizedType = (ParameterizedType) genericSuperclass;
this.type = parameterizedType.getActualTypeArguments()[0];
}
Modified: pivot/trunk/core/src/org/apache/pivot/util/Version.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Version.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Version.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Version.java Fri Oct 4 23:45:40 2013
@@ -19,11 +19,9 @@ package org.apache.pivot.util;
import java.io.Serializable;
/**
- * Represents a version number. Version numbers are defined as:
- * <p>
- * <i>major</i>.<i>minor</i>.<i>maintenance</i>_<i>update</i>
- * <p>
- * for example, "JDK 1.6.0_10".
+ * Represents a version number. Version numbers are defined as: <p>
+ * <i>major</i>.<i>minor</i>.<i>maintenance</i>_<i>update</i> <p> for example,
+ * "JDK 1.6.0_10".
*/
public class Version implements Comparable<Version>, Serializable {
private static final long serialVersionUID = -3677773163272115116L;
@@ -34,37 +32,33 @@ public class Version implements Comparab
private byte updateRevision = 0;
private String build = null;
- public Version(int majorRevision, int minorRevision, int maintenanceRevision,
- int updateRevision) {
+ public Version(int majorRevision, int minorRevision, int maintenanceRevision, int updateRevision) {
this(majorRevision, minorRevision, maintenanceRevision, updateRevision, null);
}
public Version(int majorRevision, int minorRevision, int maintenanceRevision,
int updateRevision, String build) {
if (majorRevision > 0x7f) {
- throw new IllegalArgumentException("majorRevision must be less than "
- + 0x7f + ".");
+ throw new IllegalArgumentException("majorRevision must be less than " + 0x7f + ".");
}
if (minorRevision > 0xff) {
- throw new IllegalArgumentException("minorRevision must be less than "
- + 0xff + ".");
+ throw new IllegalArgumentException("minorRevision must be less than " + 0xff + ".");
}
if (maintenanceRevision > 0xff) {
- throw new IllegalArgumentException("maintenanceRevision must be less than "
- + 0xff + ".");
+ throw new IllegalArgumentException("maintenanceRevision must be less than " + 0xff
+ + ".");
}
if (updateRevision > 0xff) {
- throw new IllegalArgumentException("updateRevision must be less than "
- + 0xff + ".");
+ throw new IllegalArgumentException("updateRevision must be less than " + 0xff + ".");
}
- this.majorRevision = (byte)majorRevision;
- this.minorRevision = (byte)minorRevision;
- this.maintenanceRevision = (byte)maintenanceRevision;
- this.updateRevision = (byte)updateRevision;
+ this.majorRevision = (byte) majorRevision;
+ this.minorRevision = (byte) minorRevision;
+ this.maintenanceRevision = (byte) maintenanceRevision;
+ this.updateRevision = (byte) updateRevision;
this.build = build;
}
@@ -100,8 +94,7 @@ public class Version implements Comparab
@Override
public boolean equals(Object object) {
- return (object instanceof Version
- && compareTo((Version)object) == 0);
+ return (object instanceof Version && compareTo((Version) object) == 0);
}
@Override
@@ -111,10 +104,8 @@ public class Version implements Comparab
@Override
public String toString() {
- String string = this.majorRevision
- + "." + this.minorRevision
- + "." + this.maintenanceRevision
- + "_" + String.format("%02d", this.updateRevision);
+ String string = this.majorRevision + "." + this.minorRevision + "."
+ + this.maintenanceRevision + "_" + String.format("%02d", this.updateRevision);
if (this.build != null) {
string += "-" + this.build;
Modified: pivot/trunk/core/src/org/apache/pivot/util/Vote.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Vote.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Vote.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Vote.java Fri Oct 4 23:45:40 2013
@@ -17,8 +17,8 @@
package org.apache.pivot.util;
/**
- * Enumeration representing a vote. Votes are often used to determine the
- * result of an event preview.
+ * Enumeration representing a vote. Votes are often used to determine the result
+ * of an event preview.
*/
public enum Vote {
/**
@@ -32,7 +32,8 @@ public enum Vote {
DENY,
/**
- * Represents a deferred vote, implying that the vote will be approved later.
+ * Represents a deferred vote, implying that the vote will be approved
+ * later.
*/
DEFER;
@@ -43,7 +44,7 @@ public enum Vote {
Vote tally;
- switch(vote) {
+ switch (vote) {
case APPROVE: {
tally = this;
break;
Modified: pivot/trunk/core/src/org/apache/pivot/util/concurrent/Task.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/concurrent/Task.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/concurrent/Task.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/concurrent/Task.java Fri Oct 4 23:45:40 2013
@@ -21,12 +21,11 @@ import java.util.concurrent.ExecutorServ
import java.util.concurrent.TimeUnit;
/**
- * Abstract base class for "tasks". A task is an asynchronous operation that
- * may optionally return a value.
- *
- * @param <V>
- * The type of the value returned by the operation. May be {@link Void} to
- * indicate that the task does not return a value.
+ * Abstract base class for "tasks". A task is an asynchronous operation that may
+ * optionally return a value.
+ *
+ * @param <V> The type of the value returned by the operation. May be
+ * {@link Void} to indicate that the task does not return a value.
*/
public abstract class Task<V> {
/**
@@ -40,8 +39,7 @@ public abstract class Task<V> {
try {
resultLocal = execute();
- }
- catch(Throwable throwable) {
+ } catch (Throwable throwable) {
faultLocal = throwable;
}
@@ -58,8 +56,7 @@ public abstract class Task<V> {
if (faultLocal == null) {
taskListenerLocal.taskExecuted(Task.this);
- }
- else {
+ } else {
taskListenerLocal.executeFailed(Task.this);
}
}
@@ -110,7 +107,8 @@ public abstract class Task<V> {
protected volatile long timeout = Long.MAX_VALUE;
protected volatile boolean abort = false;
- // TODO This is a workaround for an issue with Executors.newCachedThreadPool(), which
+ // TODO This is a workaround for an issue with
+ // Executors.newCachedThreadPool(), which
// unpredictably throws IllegalThreadStateException when run in an applet.
public static final ExecutorService DEFAULT_EXECUTOR_SERVICE = new DefaultExecutorService();
@@ -128,23 +126,21 @@ public abstract class Task<V> {
/**
* Synchronously executes the task.
- *
- * @return
- * The result of the task's execution.
- *
- * @throws TaskExecutionException
- * If an error occurs while executing the task.
+ *
+ * @return The result of the task's execution.
+ * @throws TaskExecutionException If an error occurs while executing the
+ * task.
*/
public abstract V execute() throws TaskExecutionException;
/**
* Asynchronously executes the task. The caller is notified of the task's
* completion via the listener argument. Note that the listener will be
- * notified on the task's worker thread, not on the thread that executed
- * the task.
- *
- * @param taskListenerArgument
- * The listener to be notified when the task completes.
+ * notified on the task's worker thread, not on the thread that executed the
+ * task.
+ *
+ * @param taskListenerArgument The listener to be notified when the task
+ * completes.
*/
public synchronized void execute(TaskListener<V> taskListenerArgument) {
execute(taskListenerArgument, executorService);
@@ -153,14 +149,16 @@ public abstract class Task<V> {
/**
* Asynchronously executes the task. The caller is notified of the task's
* completion via the listener argument. Note that the listener will be
- * notified on the task's worker thread, not on the thread that executed
- * the task.
- *
- * @param taskListenerArgument The listener to be notified when the task completes.
- * @param executorServiceArgument The service to submit the task to, overriding the
- * Task's own ExecutorService.
+ * notified on the task's worker thread, not on the thread that executed the
+ * task.
+ *
+ * @param taskListenerArgument The listener to be notified when the task
+ * completes.
+ * @param executorServiceArgument The service to submit the task to,
+ * overriding the Task's own ExecutorService.
*/
- public synchronized void execute(TaskListener<V> taskListenerArgument, ExecutorService executorServiceArgument) {
+ public synchronized void execute(TaskListener<V> taskListenerArgument,
+ ExecutorService executorServiceArgument) {
if (taskListenerArgument == null) {
throw new IllegalArgumentException("taskListener is null.");
}
@@ -193,11 +191,10 @@ public abstract class Task<V> {
/**
* Returns the result of executing the task.
- *
- * @return
- * The task result, or <tt>null</tt> if the task is still executing or
- * has failed. The result itself may also be <tt>null</tt>; callers should
- * call {@link #isPending()} and {@link #getFault()} to distinguish
+ *
+ * @return The task result, or <tt>null</tt> if the task is still executing
+ * or has failed. The result itself may also be <tt>null</tt>; callers
+ * should call {@link #isPending()} and {@link #getFault()} to distinguish
* between these cases.
*/
public synchronized V getResult() {
@@ -206,10 +203,9 @@ public abstract class Task<V> {
/**
* Returns the fault that occurred while executing the task.
- *
- * @return
- * The task fault, or <tt>null</tt> if the task is still executing or
- * has succeeded. Callers should call {@link #isPending()} to distinguish
+ *
+ * @return The task fault, or <tt>null</tt> if the task is still executing
+ * or has succeeded. Callers should call {@link #isPending()} to distinguish
* between these cases.
*/
public synchronized Throwable getFault() {
@@ -218,19 +214,17 @@ public abstract class Task<V> {
/**
* Returns the pending state of the task.
- *
- * @return
- * <tt>true</tt> if the task is awaiting execution or currently executing;
- * <tt>false</tt>, otherwise.
+ *
+ * @return <tt>true</tt> if the task is awaiting execution or currently
+ * executing; <tt>false</tt>, otherwise.
*/
public synchronized boolean isPending() {
return (taskListener != null);
}
-
/**
* Returns the timeout value for this task.
- *
+ *
* @see #setTimeout(long)
*/
public synchronized long getTimeout() {
@@ -240,10 +234,9 @@ public abstract class Task<V> {
/**
* Sets the timeout value for this task. It is the responsibility of the
* implementing class to respect this value.
- *
- * @param timeout
- * The time by which the task must complete execution. If the timeout is
- * exceeded, a {@link TimeoutException} will be thrown.
+ *
+ * @param timeout The time by which the task must complete execution. If the
+ * timeout is exceeded, a {@link TimeoutException} will be thrown.
*/
public synchronized void setTimeout(long timeout) {
this.timeout = timeout;
@@ -251,8 +244,8 @@ public abstract class Task<V> {
/**
* Sets the abort flag for this task to <tt>true</tt>. It is the
- * responsibility of the implementing class to respect this value and
- * throw a {@link AbortException}.
+ * responsibility of the implementing class to respect this value and throw
+ * a {@link AbortException}.
*/
public synchronized void abort() {
abort = true;
Modified: pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskGroup.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskGroup.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskGroup.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskGroup.java Fri Oct 4 23:45:40 2013
@@ -23,13 +23,11 @@ import org.apache.pivot.collections.Grou
import org.apache.pivot.collections.HashSet;
import org.apache.pivot.util.ImmutableIterator;
-
/**
* {@link Task} that runs a group of tasks in parallel and notifies listeners
* when all tasks are complete.
*/
-public class TaskGroup extends Task<Void>
- implements Group<Task<?>>, Iterable<Task<?>> {
+public class TaskGroup extends Task<Void> implements Group<Task<?>>, Iterable<Task<?>> {
private HashSet<Task<?>> tasks = new HashSet<>();
private int complete = 0;
@@ -64,7 +62,7 @@ public class TaskGroup extends Task<Void
complete = 0;
for (Task<?> task : tasks) {
- ((Task<Object>)task).execute(taskListener);
+ ((Task<Object>) task).execute(taskListener);
}
while (complete < getCount()) {
Modified: pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskListener.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskListener.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskListener.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskListener.java Fri Oct 4 23:45:40 2013
@@ -18,24 +18,21 @@ package org.apache.pivot.util.concurrent
/**
* Task listener interface.
- *
- * @param <V>
- * The return type of the task.
+ *
+ * @param <V> The return type of the task.
*/
public interface TaskListener<V> {
/**
* Called when the task has completed successfully.
- *
- * @param task
- * The source of the task event.
+ *
+ * @param task The source of the task event.
*/
public void taskExecuted(Task<V> task);
/**
* Called when task execution has failed.
- *
- * @param task
- * The source of the task event.
+ *
+ * @param task The source of the task event.
*/
public void executeFailed(Task<V> task);
}
Modified: pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskSequence.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskSequence.java?rev=1529349&r1=1529348&r2=1529349&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskSequence.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/concurrent/TaskSequence.java Fri Oct 4 23:45:40 2013
@@ -23,13 +23,11 @@ import org.apache.pivot.collections.Arra
import org.apache.pivot.collections.Sequence;
import org.apache.pivot.util.ImmutableIterator;
-
/**
* {@link Task} that runs a sequence of tasks in series and notifies listeners
* when all tasks are complete.
*/
-public class TaskSequence extends Task<Void>
- implements Sequence<Task<?>>, Iterable<Task<?>> {
+public class TaskSequence extends Task<Void> implements Sequence<Task<?>>, Iterable<Task<?>> {
private ArrayList<Task<?>> tasks = new ArrayList<>();
public TaskSequence() {
@@ -64,7 +62,7 @@ public class TaskSequence extends Task<V
throw new AbortException();
}
- ((Task<Object>)task).execute(taskListener);
+ ((Task<Object>) task).execute(taskListener);
try {
wait();