Interface Stringable

All Superinterfaces:
StringSource
All Known Subinterfaces:
AsIndentedString, AsString, Countable, Identifiable, Indexable<Element>, Indexed, IntegerNumeric<Value>, LengthOfTime<Duration>, LongKeyed, Message, PointInTime<Time,Duration>, Quantizable, QuantumComparable<Value>, Sized, TimeMeasurement
All Known Implementing Classes:
Activity, Alert, Announcement, ArgumentList, BaseCount, BaseIndexedMap, BaseList, BaseResourceList, BaseSet, BaseTime, BitCount, Bytes, CommandLine, ConcurrentMutableCount, Count, CriticalAlert, Day, DayOfWeek, Differences, DigestPassword, Duration, EnsureProblem, Estimate, FatalProblem, FileList, FilePath, FtpNetworkLocation, Glitch, Host, Hour, HourOfWeek, HttpNetworkLocation, Identifier, IndexedNameMap, Information, IntegerIdentifier, LinkedObjectList, LocalHost, LocalTime, Loopback, Maximum, MessageList, Minimum, Minute, MutableCount, Narration, NetworkLocation, NetworkPath, ObjectList, ObjectSet, OperationFailed, OperationHalted, OperationLifecycleMessage, OperationMessage, OperationStarted, OperationStatusMessage, OperationSucceeded, PackagePath, PackageReference, Path, PlainTextPassword, Problem, Quibble, Range, Rate, ReflectionProblem, ResourceList, ResourcePath, Second, SecureFtpNetworkLocation, SecureHttpNetworkLocation, Stack, StackTrace, StepFailure, StepIncomplete, StepSuccess, StringList, StringPath, SwitchList, Time, Trace, Unsupported, ValidationIssues, Warning, Week, Year

public interface Stringable extends StringSource
Interface to an object that can produce one or more different kinds of string representations. This can be useful when the Object.toString() method is already being used or when other kinds of strings are needed for specific purposes.
Author:
jonathanl (shibo)
  • Method Details

    • asString

      String asString(Stringable.Format format)
      Returns:
      A string representation of this object that is suitable for the given purpose
    • asString

      default String asString()
      Specified by:
      asString in interface StringSource
      Returns:
      The string value