MCPcopy Index your code
hub / github.com/plandex-ai/plandex / main

Method main

app/server/syntax/file_map/examples/java_example.java:144–179  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

142
143 // Main method demonstrating usage
144 public static void main(String[] args) {
145 var example = new Builder()
146 .name("Test Example")
147 .build();
148
149 // Lambda and method reference usage
150 List<String> items = Arrays.asList("a", "b", "c");
151 example.processItems(
152 items,
153 String::isEmpty,
154 System.out::println
155 );
156
157 // Stream API usage
158 Map<Status, Long> statusCounts = items.stream()
159 .map(s -> Status.PENDING)
160 .collect(Collectors.groupingBy(
161 status -> status,
162 Collectors.counting()
163 ));
164
165 // CompletableFuture with exception handling
166 example.processAsync("test")
167 .thenApply(String::toLowerCase)
168 .exceptionally(throwable -> {
169 System.err.println("Error: " + throwable.getMessage());
170 return "";
171 });
172
173 // Try-with-resources and Optional usage
174 try (var scanner = new Scanner(System.in)) {
175 Optional.of(scanner.nextLine())
176 .filter(example::validate)
177 .ifPresent(example::processAsync);
178 }
179 }
180}

Callers

nothing calls this directly

Calls 4

buildMethod · 0.80
nameMethod · 0.80
processItemsMethod · 0.80
processAsyncMethod · 0.65

Tested by

no test coverage detected