Prefer java standard libraries, then guava, then samskivert.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6095 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -33,7 +33,7 @@ import javax.swing.BorderFactory;
|
|||||||
import javax.swing.JLabel;
|
import javax.swing.JLabel;
|
||||||
import javax.swing.JPanel;
|
import javax.swing.JPanel;
|
||||||
|
|
||||||
import com.samskivert.util.ObjectUtil;
|
import com.google.common.base.Objects;
|
||||||
|
|
||||||
import com.samskivert.swing.HGroupLayout;
|
import com.samskivert.swing.HGroupLayout;
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ public abstract class FieldEditor extends JPanel
|
|||||||
}
|
}
|
||||||
|
|
||||||
// submit an attribute changed event with the new value
|
// submit an attribute changed event with the new value
|
||||||
if (!ObjectUtil.equals(value, getValue())) {
|
if (!Objects.equal(value, getValue())) {
|
||||||
_accessor.set(_field, value);
|
_accessor.set(_field, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,7 +150,7 @@ public abstract class FieldEditor extends JPanel
|
|||||||
log.warning("Failed to parse display value " + e + ".");
|
log.warning("Failed to parse display value " + e + ".");
|
||||||
displayValue(getValue());
|
displayValue(getValue());
|
||||||
}
|
}
|
||||||
updateBorder(!ObjectUtil.equals(dvalue, getValue()));
|
updateBorder(!Objects.equal(dvalue, getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import java.lang.reflect.Field;
|
|||||||
|
|
||||||
import javax.swing.JComboBox;
|
import javax.swing.JComboBox;
|
||||||
|
|
||||||
import com.samskivert.util.ObjectUtil;
|
import com.google.common.base.Objects;
|
||||||
|
|
||||||
import com.threerings.presents.dobj.DObject;
|
import com.threerings.presents.dobj.DObject;
|
||||||
import com.threerings.presents.util.PresentsContext;
|
import com.threerings.presents.util.PresentsContext;
|
||||||
@@ -125,7 +125,7 @@ public class PulldownFieldEditor extends FieldEditor
|
|||||||
{
|
{
|
||||||
for (int ii = _value.getItemCount() - 1; ii >= 0; ii--) {
|
for (int ii = _value.getItemCount() - 1; ii >= 0; ii--) {
|
||||||
Choice choice = (Choice)_value.getItemAt(ii);
|
Choice choice = (Choice)_value.getItemAt(ii);
|
||||||
if (ObjectUtil.equals(value, choice.value)) {
|
if (Objects.equal(value, choice.value)) {
|
||||||
_value.setSelectedIndex(ii);
|
_value.setSelectedIndex(ii);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,11 +21,11 @@
|
|||||||
|
|
||||||
package com.threerings.crowd.chat.client;
|
package com.threerings.crowd.chat.client;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
import com.samskivert.util.CollectionUtil;
|
|
||||||
import com.samskivert.util.ObserverList;
|
import com.samskivert.util.ObserverList;
|
||||||
|
|
||||||
import com.threerings.util.MessageBundle;
|
import com.threerings.util.MessageBundle;
|
||||||
@@ -70,7 +70,7 @@ public class MuteDirector extends BasicDirector
|
|||||||
{
|
{
|
||||||
this(ctx);
|
this(ctx);
|
||||||
|
|
||||||
CollectionUtil.addAll(_mutelist, list);
|
Collections.addAll(_mutelist, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ import com.google.common.base.Predicate;
|
|||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
import com.google.common.primitives.Longs;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
|
|
||||||
import com.samskivert.util.Comparators;
|
|
||||||
import com.samskivert.util.Interval;
|
import com.samskivert.util.Interval;
|
||||||
import com.samskivert.util.Lifecycle;
|
import com.samskivert.util.Lifecycle;
|
||||||
import com.samskivert.util.ResultListener;
|
import com.samskivert.util.ResultListener;
|
||||||
@@ -321,7 +321,7 @@ public abstract class CrowdPeerManager extends PeerManager
|
|||||||
protected static final Comparator<ChatHistoryEntry> SORT_BY_TIMESTAMP =
|
protected static final Comparator<ChatHistoryEntry> SORT_BY_TIMESTAMP =
|
||||||
new Comparator<ChatHistoryEntry>() {
|
new Comparator<ChatHistoryEntry>() {
|
||||||
public int compare (ChatHistoryEntry e1, ChatHistoryEntry e2) {
|
public int compare (ChatHistoryEntry e1, ChatHistoryEntry e2) {
|
||||||
return Comparators.compare(e1.message.timestamp, e2.message.timestamp);
|
return Longs.compare(e1.message.timestamp, e2.message.timestamp);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,8 @@
|
|||||||
package com.threerings.presents.peer.data;
|
package com.threerings.presents.peer.data;
|
||||||
|
|
||||||
import javax.annotation.Generated;
|
import javax.annotation.Generated;
|
||||||
import com.samskivert.util.ObjectUtil;
|
|
||||||
|
import com.google.common.base.Objects;
|
||||||
|
|
||||||
import com.threerings.io.SimpleStreamableObject;
|
import com.threerings.io.SimpleStreamableObject;
|
||||||
import com.threerings.io.Streamable;
|
import com.threerings.io.Streamable;
|
||||||
@@ -115,7 +116,7 @@ public class NodeObject extends DObject
|
|||||||
public boolean equals (Object other)
|
public boolean equals (Object other)
|
||||||
{
|
{
|
||||||
Lock olock = (Lock)other;
|
Lock olock = (Lock)other;
|
||||||
return type.equals(olock.type) && ObjectUtil.equals(id, olock.id);
|
return type.equals(olock.type) && Objects.equal(id, olock.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,10 @@ import java.util.List;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
|
|
||||||
|
import com.google.common.collect.Iterators;
|
||||||
|
|
||||||
import org.apache.velocity.VelocityContext;
|
import org.apache.velocity.VelocityContext;
|
||||||
|
|
||||||
import com.samskivert.util.CollectionUtil;
|
|
||||||
import com.samskivert.util.ComparableArrayList;
|
import com.samskivert.util.ComparableArrayList;
|
||||||
import com.samskivert.util.StringUtil;
|
import com.samskivert.util.StringUtil;
|
||||||
|
|
||||||
@@ -103,7 +104,7 @@ public class GenReceiverTask extends InvocationTask
|
|||||||
|
|
||||||
// construct our imports list
|
// construct our imports list
|
||||||
ComparableArrayList<String> implist = new ComparableArrayList<String>();
|
ComparableArrayList<String> implist = new ComparableArrayList<String>();
|
||||||
CollectionUtil.addAll(implist, imports);
|
Iterators.addAll(implist, imports);
|
||||||
checkedAdd(implist, ClientObject.class.getName());
|
checkedAdd(implist, ClientObject.class.getName());
|
||||||
checkedAdd(implist, InvocationSender.class.getName());
|
checkedAdd(implist, InvocationSender.class.getName());
|
||||||
String dname = rname.replace("Receiver", "Decoder");
|
String dname = rname.replace("Receiver", "Decoder");
|
||||||
@@ -135,7 +136,7 @@ public class GenReceiverTask extends InvocationTask
|
|||||||
|
|
||||||
// construct our imports list
|
// construct our imports list
|
||||||
ComparableArrayList<String> implist = new ComparableArrayList<String>();
|
ComparableArrayList<String> implist = new ComparableArrayList<String>();
|
||||||
CollectionUtil.addAll(implist, imports);
|
Iterators.addAll(implist, imports);
|
||||||
checkedAdd(implist, InvocationDecoder.class.getName());
|
checkedAdd(implist, InvocationDecoder.class.getName());
|
||||||
implist.sort();
|
implist.sort();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user