APISonar


java.util.ArrayList.toString

> java > util > ArrayList > toString
java APIs util APIs ArrayList APIs toString APIs

Example 1
protected ArrayList<T> cache=new ArrayList<T>();

	public String toString()
	{
		String str="numValid: "+numValid+"\n"+map.toString()+"\n"+cache.toString();
		return str;
	}
Example 2
protected ArrayList<Word> wordsInSentence;

	public String toString(){
		return "[ untagged: <"+untagged+"> ||| tagged: "+wordsInSentence.toString()+" ||| SparseReferences Object: "+getReferences().toString()+" ]";
		//||| tense: "+tense.toString()+" ||| point of view: "+pointOfView.toString()+" conjugation(s): "+conj.toString()+" ]";// ||| functionWords : "+functionWords.toString()+" ]";
	}
Example 3
protected ArrayList list = null;

    public String toString() {

        StringBuffer sb = new StringBuffer("FastArrayList[");
        sb.append(list.toString());
        sb.append("]");
        return (sb.toString());

    }
Example 4
public String toString()
    {
        ArrayList<Integer> head = new ArrayList<Integer>(20);
        for (int i = 0; i < Math.min(size, 20); ++i)
        {
            head.add(data[i]);
        }
        return head.toString();
    }
Example 5
public String toString() {
        ArrayList<BasicBlock> ret = getBasicBlocks();
        Collections.sort(ret);
        return ret.toString();
    }
Example 6
public static String logicString(ArrayList<Integer> logic) {
        String l = logic.toString();
        l = l.replaceAll("\\[","");
        l = l.replaceAll("\\]","");
        l = l.replaceAll(",","");
        l = l.replaceAll(" ","");
        l = l.replaceAll("2","-");//dontcare
        return l;
    }
Example 7
public final ArrayList<RouteInfo> routes;

    public String toString() {
        return "MediaRouterClientState{ globallySelectedRouteId="
                + globallySelectedRouteId + ", routes=" + routes.toString() + " }";
    }
Example 8
public String toString() {
        ArrayList<Integer> lst = new ArrayList<Integer>();
        for (PatternElementMatch m : patternElementMatchList) {
            lst.add(m.getMatchedInstructionInstructionHandle().getPosition());
        }
        return lst.toString();
    }
Example 9
private ArrayList<String> mock;

    public void testCreateNiceMockString() {
        mock = builder.addMockedMethod("size").addMockedMethod("toString").createNiceMock("myName");
        replay(mock);
        assertEquals(0, mock.size());
        verify(mock);
        assertTrue(mock.toString().contains("myName"));
    }
Example 10
private final ArrayList<String> tags = new ArrayList<String>();

    private void assertTagsAre(String... expectedTags) {
        List<String> expected = Arrays.asList(expectedTags);
        assertEquals(expected.toString(), tags.toString());
    }
Example 11
public void test_toString() {
        ArrayList l = new ArrayList(1);
        l.add(l);
        String result = l.toString();
        assertTrue("should contain self ref", result.indexOf("(this") > -1);
    }
Example 12
private String getNewInstanceArgumentString(Object [] args) {
    if (args == null) {
      return "arguments: NULL";
    }
    ArrayList<String> argClasses = new ArrayList<>();
    for (Object obj : args) {
      argClasses.add(obj.getClass().getSimpleName());
    }
    return "arguments: " + Arrays.toString(args) + ", argument classes: " + argClasses.toString();
  }
Example 13
public static boolean isEqualIgnoringOrder(List left, List right) {
    if (left != null && right != null) {
      ArrayList sortedLeft = new ArrayList(left);
      ArrayList sortedRight = new ArrayList(right);
      Collections.sort(sortedLeft);
      Collections.sort(sortedRight);
      return sortedLeft.toString().equals(sortedRight.toString());
    } else {
      return left == right;
    }
  }
Example 14
private final ArrayList<State> mQueuedRequests = new ArrayList<>();

    public State getState() {
        Assert.isMainThread();
        if (isExecutingTransition()) {
            throw new IllegalStateException("Cannot get state because there were pending "
                    + "transitions: " + mQueuedRequests.toString());
        }
        return mState;
    }
Example 15
private String sortToString(Collection<Long> longs) {
        ArrayList<Long> copy = new ArrayList<Long>(longs);
        Collections.sort(copy);
        return copy.toString();
    }
Example 16
private static String getResult(ResultSet rs) throws SQLException {
        ArrayList<String> list = New.arrayList();
        while (rs.next()) {
            StringBuilder buff = new StringBuilder();
            for (int i = 0; i < rs.getMetaData().getColumnCount(); i++) {
                if (i > 0) {
                    buff.append(" ");
                }
                buff.append(rs.getString(i + 1));
            }
            list.add(buff.toString());
        }
        Collections.sort(list);
        return list.toString();
    }
Example 17
ArrayList<Object> paramList;

    public void getResult(Connection conn) {
	    gotResult = true;
	
	    //build the SQL statement, looping through params
	    try {
	    	executeQuery(conn);
	    } catch (Exception e) {
	    	Logger.error(this, "getResult(): unable to execute query.  Bad SQL? : " + (SQL != null ? SQL + " " : "") + (paramList != null ? paramList.toString() + " " : "") + e.getMessage(), e);
	        throw new DotRuntimeException(e.toString());
	    }
	
	}
Example 18
public ArrayList<Vector3f>   scales;

    public String toString() {
        StringBuilder result = new StringBuilder(2048);
        result.append("TRACK: ").append(name).append('\n');
        if (translations != null && translations.size() > 0) {
            result.append("TRANSLATIONS: ").append(translations.toString()).append('\n');
        }
        if (rotations != null && rotations.size() > 0) {
            result.append("ROTATIONS:    ").append(rotations.toString()).append('\n');
        }
        if (scales != null && scales.size() > 0) {
            result.append("SCALES:       ").append(scales.toString()).append('\n');
        }
        return result.toString();
    }
Example 19
private final ArrayList<String> mInterfaces = new ArrayList<String>();

    public void dump(PrintWriter pw, String prefix) {
        pw.println(prefix + mId + " " + this);
        String indent = prefix + "  ";

        pw.println(indent + "component=" + mComponentName.toString());
        pw.println(indent + "user id=" + mUserId);
        pw.println(indent + "interfaces=" + mInterfaces.toString());
        pw.println(indent + "connections=" + mConnections.toString());
        pw.println(indent + "running=" + mRunning);
        pw.println(indent + "interested=" + mInterested);
        pw.println(indent + "bound=" + mBound);
    }
Example 20
public static void main(String[] args) {
		ArrayList<String> array = new ArrayList<String>();

		array.add("hello");
		array.add("world");
		array.add("java");

		System.out.println(array.toString()); // [hello, world, java]
	}
Example 21
private static void compareIterator(String[] expected, Iterator<PsiTypeParameter> it) {
    final ArrayList<String> actual = new ArrayList<String>();
    while (it.hasNext()) {
      PsiTypeParameter typeParameter = it.next();
      actual.add(typeParameter.getName());
    }
    assertEquals(Arrays.asList(expected).toString(), actual.toString());
  }
Example 22
private final ArrayList<Integer> mList = new ArrayList<>();

    public void ensure(int id) {
        final int length = mList.size();
        for (int i = 0; i < length; i += 2) {
            if (mList.get(i) <= id && mList.get(i + 1) >= id) return;
        }
        // Oh no
        throw new RuntimeException(
                "You must request range before:"
                        + " id=" + id
                        + " list=" + mList.toString());
    }
Example 23
public void addAnnotation(Map<String, Object> annotation) {
			for (Map.Entry<String, Object> entry : annotation.entrySet()) {
			    String key = entry.getKey();
			    		    
			    if (key.equals("points")) {
			    	ArrayList<Double> value = (ArrayList<Double>)entry.getValue();
			    	eventMap.put("dataPoints", pointsToString(value));
			    } else {
			    	Object value = entry.getValue();
			    	eventMap.put(key, value.toString());
			    }
			}
		}
Example 24
private static ClassLoader getAccumuloClassLoader() throws IOException {
    ClassLoader parentClassLoader = ClassLoader.getSystemClassLoader();
    ArrayList<URL> accumuloURLs = findAccumuloURLs();
    log.debug("Create Dependency ClassLoader using URLs: " + accumuloURLs.toString());
    URLClassLoader aClassLoader = new URLClassLoader(accumuloURLs.toArray(new URL[accumuloURLs.size()]), parentClassLoader);
    return aClassLoader;
  }
Example 25
public static void main(String[] args) {
		int size = 5;
		boolean[][] maze = AssortedMethods.randomBooleanMatrix(size, size, 70);
		
		AssortedMethods.printMatrix(maze);
		
		ArrayList<Point> path = getPath(maze);
		if (path != null) {
			System.out.println(path.toString());
		} else {
			System.out.println("No path found.");
		}
	}