Skip to content

Commit

Permalink
lazy val: add isAvailable
Browse files Browse the repository at this point in the history
  • Loading branch information
davleopo committed Feb 3, 2025
1 parent fc48493 commit 527ceb8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -51,4 +51,8 @@ public T get() {
}
return value;
}

public boolean isAvailable() {
return value != null;
}
}

0 comments on commit 527ceb8

Please sign in to comment.