java.util.AbstractMap.SimpleEntry

Here are the examples of the java api class java.util.AbstractMap.SimpleEntry taken from open source projects.

1. StringField#conditionalTextColor()

Project: FunDapter
Source File: StringField.java
View license
public StringField<T> conditionalTextColor(BooleanExtractor<T> extractor, int colorIfTrue, int colorIfFalse) {
    if (extractor == null)
        throw new IllegalArgumentException("boolean extractor cannot be null");
    conditionalTextColorEntry = new SimpleEntry<BooleanExtractor<T>, Integer[]>(extractor, new Integer[] { colorIfTrue, colorIfFalse });
    return this;
}

2. SerializationTest#testObject()

Project: JDBM3
Source File: SerializationTest.java
View license
public void testObject() throws ClassNotFoundException, IOException {
    SimpleEntry a = new SimpleEntry(1, "11");
    byte[] buf = ser.serialize(a);
    SimpleEntry l2 = (SimpleEntry) ser.deserialize(buf);
    assertEquals(l2, a);
}

3. SerializationTest#testNoArgumentConstructorInJavaSerialization()

Project: JDBM3
Source File: SerializationTest.java
View license
public void testNoArgumentConstructorInJavaSerialization() throws ClassNotFoundException, IOException {
    SimpleEntry a = new SimpleEntry(1, "11");
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    new ObjectOutputStream(out).writeObject(a);
    ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(out.toByteArray()));
    SimpleEntry a2 = (SimpleEntry) in.readObject();
    assertEquals(a, a2);
}