Class Calls.Screening

java.lang.Object
com.aurelienpierre.sioul.Calls.Screening
Enclosing class:
Calls

static final class Calls.Screening extends Object
The call screening, as a table of version 2 says it (crates/sioul-core/src/screening.rs, `TablePart`): what becomes of a number nobody knows, apart from do-not-disturb and every state.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) String
    "voicemail", "unknown".
    (package private) final Set<String>
    In national form ("0162").
    (package private) long
    A number called within this long counts as your contacts do (ms); 0: none.
    (package private) String
     
    (package private) String
    "always", "outside-work".
    (package private) String
     
    (package private) final Set<String>
     
    (package private) int
    The longest prefix of either: how far a number is looked up.
    (package private) boolean
     
    (package private) String
    "voicemail", "work", "ring".
    (package private) String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) boolean
    among(String national, Set<String> prefixes)
    Whether a national number starts with one of these prefixes.
    (package private) static Calls.Screening
    of(JSONObject json)
    As a table says it.
    private static int
    prefixes(JSONArray array, Set<String> into)
    The prefixes of an array kept (national form, digits from 0); the longest's length.
    (package private) boolean
    rings(boolean hiddenNumber, boolean workHours)
    Whether a number nobody knows, or a hidden one, rings by the screening alone, work or admin time then or not (screening.rs, `Screening::rings`): off, outside its hours, its rule.
    private static String
    word(JSONObject json, String key, String otherwise, String... known)
    A word of the table, when it is one of `known`; else `otherwise`.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • of

      static Calls.Screening of(JSONObject json)
      As a table says it. A word this Java does not know (a later Sioul's, after a downgrade), or a setting that is not one, never declines a call: whatever cannot be decided rings (review of part 2, 19 October 2026, F9). The screening on only when it says true, at hours it knows; a rule not known rings; a kind of spam not known goes as any number nobody knows.
    • word

      private static String word(JSONObject json, String key, String otherwise, String... known)
      A word of the table, when it is one of `known`; else `otherwise`.
    • prefixes

      private static int prefixes(JSONArray array, Set<String> into)
      The prefixes of an array kept (national form, digits from 0); the longest's length.
    • among

      boolean among(String national, Set<String> prefixes)
      Whether a national number starts with one of these prefixes.
    • rings

      boolean rings(boolean hiddenNumber, boolean workHours)
      Whether a number nobody knows, or a hidden one, rings by the screening alone, work or admin time then or not (screening.rs, `Screening::rings`): off, outside its hours, its rule.