@Test public void testToString() { WildcardPermission p1 = new WildcardPermission("*"); WildcardPermission p2 = new WildcardPermission("one"); WildcardPermission p3 = new WildcardPermission("one:two"); WildcardPermission p4 = new WildcardPermission("one,two:three,four"); WildcardPermission p5 = new WildcardPermission("one,two:three,four,five:six:seven,eight"); assertTrue("*".equals(p1.toString())); assertTrue(p1.equals(new WildcardPermission(p1.toString()))); assertTrue("one".equals(p2.toString())); assertTrue(p2.equals(new WildcardPermission(p2.toString()))); assertTrue("one:two".equals(p3.toString())); assertTrue(p3.equals(new WildcardPermission(p3.toString()))); assertTrue("one,two:three,four".equals(p4.toString())); assertTrue(p4.equals(new WildcardPermission(p4.toString()))); assertTrue("one,two:three,four,five:six:seven,eight".equals(p5.toString())); assertTrue(p5.equals(new WildcardPermission(p5.toString()))); }
public String toString() { StringBuilder buffer = new StringBuilder(); for (Set<String> part : parts) { if (buffer.length() > 0) { buffer.append(PART_DIVIDER_TOKEN); } Iterator<String> partIt = part.iterator(); while(partIt.hasNext()) { buffer.append(partIt.next()); if (partIt.hasNext()) { buffer.append(SUBPART_DIVIDER_TOKEN); } } } return buffer.toString(); }
WildcardPermission implements Permission, Serializable { public String toString() { StringBuilder buffer = new StringBuilder(); for (Set<String> part : parts) { if (buffer.length() > 0) { buffer.append(PART_DIVIDER_TOKEN); } Iterator<String> partIt = part.iterator(); while(partIt.hasNext()) { buffer.append(partIt.next()); if (partIt.hasNext()) { buffer.append(SUBPART_DIVIDER_TOKEN); } } } return buffer.toString(); } }
WildcardPermission implements Permission, Serializable { public String toString() { StringBuilder buffer = new StringBuilder(); for (Set<String> part : parts) { if (buffer.length() > 0) { buffer.append(PART_DIVIDER_TOKEN); } Iterator<String> partIt = part.iterator(); while(partIt.hasNext()) { buffer.append(partIt.next()); if (partIt.hasNext()) { buffer.append(SUBPART_DIVIDER_TOKEN); } } } return buffer.toString(); } protected  WildcardPermission();  WildcardPermission(String wildcardString);  WildcardPermission(String wildcardString, boolean caseSensitive); }
WildcardPermission implements Permission, Serializable { public String toString() { StringBuilder buffer = new StringBuilder(); for (Set<String> part : parts) { if (buffer.length() > 0) { buffer.append(PART_DIVIDER_TOKEN); } Iterator<String> partIt = part.iterator(); while(partIt.hasNext()) { buffer.append(partIt.next()); if (partIt.hasNext()) { buffer.append(SUBPART_DIVIDER_TOKEN); } } } return buffer.toString(); } protected  WildcardPermission();  WildcardPermission(String wildcardString);  WildcardPermission(String wildcardString, boolean caseSensitive); boolean implies(Permission p); String toString(); boolean equals(Object o); int hashCode(); }
WildcardPermission implements Permission, Serializable { public String toString() { StringBuilder buffer = new StringBuilder(); for (Set<String> part : parts) { if (buffer.length() > 0) { buffer.append(PART_DIVIDER_TOKEN); } Iterator<String> partIt = part.iterator(); while(partIt.hasNext()) { buffer.append(partIt.next()); if (partIt.hasNext()) { buffer.append(SUBPART_DIVIDER_TOKEN); } } } return buffer.toString(); } protected  WildcardPermission();  WildcardPermission(String wildcardString);  WildcardPermission(String wildcardString, boolean caseSensitive); boolean implies(Permission p); String toString(); boolean equals(Object o); int hashCode();  }